• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

IFRAME Pause

Guest
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

hi guys , I tried looking in before posting but could find any thing . here is the problem .

I have main page and in it i have iFrame . Code goes like this .

function Dup(){
DefAccountFrame.document.location = 'sliclist.cfm?sliclist='+GetSLIC+'&type='+me; // iframe call .
another_func_call();
}

now the problem is another_func_call(); is not waiting for the Iframe page processing to get completed and then invoke it self, what i am using right now is setTimeout("callme();",1000); inbetween but its not a good solution . what i want is another_func_call() to WAIT untill all the processing within Iframe is Done (which is populating some drop down menu based on Input) and then Another_func_call() will submit the page .

any idea ?
TOPICS
Advanced techniques

Views

386

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

This is a JavaScript problem rather than a ColdFusion one, but anyhow... what you want is to keep checking the document.readyState property until it gets set to 4.

More details available here: http://www.quirksmode.org/blog/archives/2005/09/xmlhttp_notes_r_2.html

(That page is for XMLHTTP (aka AJAX), but it should work with an IFRAME too)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

LATEST
Thanks peter for the link , Here is the detailed Code with Reccursive call to function to make sure IFRAME is loaded before doing any thing else on the page .

<!--- Function to Handle on Enter Event of SLIC --->
function Duplicate(GetSLIC){
var me = 'SLIC';
DefAccountFrame.document.location = 'sliclist.cfm?sliclist='+GetSLIC+'&type='+me;
dual();
}
<!--- End Function --->

<!---Mediator Function to handle recursive requests from callme(); to check the readystate and adding1 sec each call --->
function dual(){
setTimeout("callme(DefAccountFrame.document.readyState);",1000);
}

<!--- Reccusrsive calling to a function if all the drop down menus are not populated it will wait untill Iframe is done processing--->
function callme(me){
if (me == 'complete'){
ser(); // function needs to be called Finally which will submit the page .
}
else{
dual(DefAccountFrame.document.readyState);
}

}



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation