Sir:
Is is possible to "autostart" multiple float boxes when a page loads?
FWC
multiple autostarts
Page: 1
Author | Post |
---|---|
#1 Thu Feb 21, 2013 4:53 pm
|
|
Member
Registered: Nov 2008
Posts: 28
|
|
#2 Thu Feb 21, 2013 5:43 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
Only one floatbox can be opened by assigning the 'autoStart:true' option to a floatboxed link. But an infinite number can be launched with the fb.start() API function.
It could look like this: <script> Or, the startup could be tied to the afterFBLoaded callback: <script> Or, perhaps you want to chain the starts rather than having them pop right up. You could use the afterBoxStart callback of one item to open the next: <script> Of course, the API Reference will tell you (mostly) all there is to know about the fb.start function. |
#3 Thu Feb 21, 2013 6:28 pm
|
|
Member
Registered: Nov 2008
Posts: 28
|
Sir:
Can I wrap that in a conditional statement so that the float boxes only display under certain circumstances, for example: <script language="javascript"> TheStartMsg = document.getElementById("TheStartMsg").value if ( TheStartMsg == "OKShow" ) { fbPageOptions = { afterFBLoaded: function () { fb.start('FIRG_GetOrganization_13.asp'); fb.start('popup_requestinfo_13.asp'); } } }; </script> --FWC |
#4 Thu Feb 21, 2013 7:20 pm
|
|
Member
Registered: Nov 2008
Posts: 28
|
Sir:
I also tried without the conditional statment: <script language="javascript"> TheStartMsg = document.getElementById("TheStartMsg").value fbPageOptions = { afterFBLoaded: function () { fb.start('popup_requestinfo_13.asp'); fb.start('FIRG_GetOrganization_13.asp'); } }; I am not getting any errors but I am also not seeing the floatbox. ---FWC |
#5 Fri Feb 22, 2013 1:18 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
They are both probably failing because you are checking TheStartMsg value before it exists in the document and the script is consequently crashing. In your first code snippet, you would want to move that conditional check into the afterFBLoaded function. But I would have to see the live page to determine with certainty why the failure is occurring.
|
Page: 1