| | |
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 |
ajax ajaxcode ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close column cookies createrange() css cursor dependent disablefirebug dom download dropdown editor element engine error events explorer ext file form forms google gwt gxt hiddenvalue highlightedword html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump libcurl math media microsoft mimic object onerror onmouseoutdivproblem onreadystatechange parent pdf php player post problem progressbar rated rating regex runtime scroll search security select session shopping size software sql star stars synchronous text textarea unicode validation w3c web website window windowofwords windowsxp wysiwyg xml \n





