|
-
May 27th, 2012, 01:51 PM
#1
Thread Starter
Junior Member
Ajax Dynamic Load event click(function(){ value retrieval from divs
Ajax Dynamic Load event click(function(){ value retrieval from divs
Ajax dynamic website loads stuff like this, attaches links to Divs
Code:
<html>
<head>
<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
Wicket.Event.add(window, "load", function(event) { $("#iconContainer3").click(function(){Plimus.web.ui.openNewWindow('http://www.emagenerator.com/');});});
/*-->]]>*/</script>
<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
Wicket.Event.add(window, "load", function(event) { $("#iconContainer4").click(function(){Plimus.web.ui.openNewWindow('http://www.partnermark.com');});});
/*-->]]>*/</script>
………..
</head>
<body> …….
<div class="item-name-icon tooltip-marker " id="itemUrlIcon3a">
<div id="iconContainer6" class="ui-state-default ui-corner-all ui-button-fade"><span class="ui-icon ui-icon-extlink"></span></div> </div>
Question is how do I can get value of links 'http://www.emagenerator.com and 'http://www.partnermark.com' from divs?
-
May 29th, 2012, 06:40 AM
#2
Hyperactive Member
Re: Ajax Dynamic Load event click(function(){ value retrieval from divs
i havent used ajax a whole lot but if the content you want is found withing a Div, you can use the innerHtml method to get it. For instance, if you had a div like this:
HTML Code:
<div id="myDiv" > Hello World</div>
you can do this in javascript:
javascript Code:
function getIt(){
var myDiv= document.getElementById("myDiv")
var myText = myDiv.innerText
alert(myText & 'can be found in ' & myDiv)
}
something like that should work, although i didn't test it, so check for typos
if i was able to help, rate my post!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|