(ot) Javascript Help

View: New views
3 Messages — Rating Filter:   Alert me  

(ot) Javascript Help

by Michael Muller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ok, I need some Javascript help.

I just cannot get this script (residing in an iframe)...


<script>
parent.thisMovie('studio_loader_embed').reloadClipart();
parent.thisMovie('studio_loader_embed').showTab(2);
</script>


...to go through this script...

<script>
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return HTMLCollection.namedItem(movieName)
} else {
return document[movieName]
}
}
</script>


...to function on this object...


<div style="margin:0px; padding:5px; width:670px; float:left;">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="670" height="550">
                       
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0" />
<param name="quality" value="high" />
<param name="bgcolor" value="white" />  

<embed src="/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0"
quality="high" bgcolor="white" width="670" height="550"
id="studio_loader_embed"
align="middle" allowScriptAccess="sameDomain"
allowFullScreen="false" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
       
</object>

</div>

---------------------------------------------------------

For the thisMovie() function I have tried all these combinations for IE:

HTMLCollection.namedItem(movieName)  // HTMLCollection is undefined
namedItem(movieName)  // Object expected
document.getElementById //  'parent.thisMovie(...)' is null or not an object



You can see this functionality work in FF by going here...

http://www.silverscreendesign.com/designlab.cfm?proid=1264

... and clicking on the "Your Cart" button in the right.  Clicking that button should make the flash movie's tab go to "Add Art"

It does not work in IE.

Someone told me that IE cannot talk to an embed tag, only an object tag, but I believe the ID vs NAME issue is tripping me up.

I would be more than happy to send a PayPal payment for your time.

Thanks,

Mik



--------
Michael Muller
office (413) 863-6455
cell (413) 320-5336
skype: michaelBmuller
http://MontagueWebWorks.com

Information is not knowledge
Knowlege is not wisdom

Eschew Obfuscation


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324381
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.4

Re: (ot) Javascript Help

by James Holmes-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


There's probably something in jquery that'll do it on one line of
cross browser code...

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

2009/7/9 Michael Muller <michael@...>:

>
> Ok, I need some Javascript help.
>
> I just cannot get this script (residing in an iframe)...
>
>
> <script>
> parent.thisMovie('studio_loader_embed').reloadClipart();
> parent.thisMovie('studio_loader_embed').showTab(2);
> </script>
>
>
> ...to go through this script...
>
> <script>
> function thisMovie(movieName) {
> if (navigator.appName.indexOf("Microsoft") != -1) {
> return HTMLCollection.namedItem(movieName)
> } else {
> return document[movieName]
> }
> }
> </script>
>
>
> ...to function on this object...
>
>
> <div style="margin:0px; padding:5px; width:670px; float:left;">
>
> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
> width="670" height="550">
>
> <param name="allowScriptAccess" value="sameDomain" />
> <param name="allowFullScreen" value="false" />
> <param name="movie" value="/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0" />
> <param name="quality" value="high" />
> <param name="bgcolor" value="white" />
>
> <embed src="/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0"
> quality="high" bgcolor="white" width="670" height="550"
> id="studio_loader_embed"
> align="middle" allowScriptAccess="sameDomain"
> allowFullScreen="false" type="application/x-shockwave-flash"
> pluginspage="http://www.macromedia.com/go/getflashplayer" />
>
> </object>
>
> </div>
>
> ---------------------------------------------------------
>
> For the thisMovie() function I have tried all these combinations for IE:
>
> HTMLCollection.namedItem(movieName)  // HTMLCollection is undefined
> namedItem(movieName)  // Object expected
> document.getElementById //  'parent.thisMovie(...)' is null or not an object
>
>
>
> You can see this functionality work in FF by going here...
>
> http://www.silverscreendesign.com/designlab.cfm?proid=1264
>
> ... and clicking on the "Your Cart" button in the right.  Clicking that button should make the flash movie's tab go to "Add Art"
>
> It does not work in IE.
>
> Someone told me that IE cannot talk to an embed tag, only an object tag, but I believe the ID vs NAME issue is tripping me up.
>
> I would be more than happy to send a PayPal payment for your time.
>
> Thanks,
>
> Mik
>
>
>
> --------
> Michael Muller
> office (413) 863-6455
> cell (413) 320-5336
> skype: michaelBmuller
> http://MontagueWebWorks.com
>
> Information is not knowledge
> Knowlege is not wisdom
>
> Eschew Obfuscation
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324386
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.4

Re: (ot) Javascript Help

by Dave Watts :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Someone told me that IE cannot talk to an embed tag, only an object tag, but I believe
> the ID vs NAME issue is tripping me up.

I don't think IE uses the EMBED tag at all. Give your OBJECT an ID of
its own, and use that when you're in IE.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324387
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.4