| | |
How to get to the First parent location?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I want to get to the parent location each time I'm adding a record. the problem is that i have a nested iframes, and each time the number of those is incremented:
eg.
at first adding record i have the location like this: parent.location
second: parent.parent.location
third: parent.parent.parent.location
how could i get to the initial location, without adding each time "parent."
Best regards,
zanzo
eg.
at first adding record i have the location like this: parent.location
second: parent.parent.location
third: parent.parent.parent.location
how could i get to the initial location, without adding each time "parent."
Best regards,
zanzo
Best regards,
zanzo
zanzo
Wel am not sure if this wil work.
First, try to add a
then try to incoporate the following bits of code in your script.
First, try to add a
<base> module with your preferred (x)html document. html Syntax (Toggle Plain Text)
<base target="_top" />
javascript Syntax (Toggle Plain Text)
function someFunc() { //Storing location as array's and get the ref n#. var thisLocation = []; thisLocation.push(parent.location); if (confirm('Whatever is true!','Test') == true) { alert(thisLocation[0].match(/\w\.[xhtml]{1}/)) }
Sorry i missed something on my first post.
It should be something like this
It should be something like this
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script type="text/javascript"> function someFunc() { //Storing location as array's and get the ref n#. //Try to run this demo var thisLocation = []; thisLocation.push(parent.location); var loc = new String(thisLocation[0]); if (confirm('Whatever is true!','Test') == true) { alert(loc.match(/\w+\.[html]{4}|\w+\.[xhtml]{5})) } else { alert(loc); } } window.onload = someFunc; </script>
![]() |
Similar Threads
- onclick parent goto previous page (HTML and CSS)
- opening parent page by clicking url of iframe? (PHP)
- Javascript works on explore 6.0 but not on explore 5.0 and explore mac (C#)
- window location using frames (JavaScript / DHTML / AJAX)
- Help with .js JAVASCRIPT file!!!!!?!!?!? (JavaScript / DHTML / AJAX)
- urgent-how to pass multiple values to the parent form (ASP)
- urgent-how to pass multiple values to the parent form (HTML and CSS)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: AJAX problem in firefox but fine in IE
- Next Thread: Ajax problem with DIV update
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp ajaxjspservlets animate api automatically blackjack browser bug calendar captchaformproblem checkbox child class close cookies createrange() cursor dependent disablefirebug dom dropdown editor element engine events explorer ext file firehose flash form forms game google gxt hiddenvalue highlightedword html htmlform ie8 iframe image() images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl math matrixcaptcha media microsoft mp3 mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player post progressbar rated regex runtime scroll search security session shopping size software sql star stars stretch synchronous text textarea twitter unicode validation web website window windowsxp wysiwyg xspf \n





