convert this javascript code to jquery - help!

JavaScript related questions should go here.
Post Reply
TeeGee
Posts: 5
Joined: Tue Jan 31, 2012 5:32 am

convert this javascript code to jquery - help!

Post by TeeGee »

hello, i have this code..


[syntax=javascript]<script language='Javascript' type='text/javascript'>
function RefreshMessage()
{
msg=document.getElementsByName("cboxmain")[0];
msg.src=msg.src;
setTimeout("RefreshMessage()",7000);
}
</script>

<script type='text/javascript'>
window.onload=RefreshMessage();
</script>[/syntax]

i have an iframe "http://www5.cbox.ws/box/?boxid=696909&boxtag=qpnlws&sec=main" with a name "cboxmain".

[syntax=php]<iframe frameborder="0" width="488" height="455" src="http://www5.cbox.ws/box/?boxid=696909&boxtag=qpnlws&sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#DBE2ED 1px solid;" id="cboxmain"></iframe>[/syntax]

what basically it does is it refreshes the content inside my iframe every 7 seconds. the content in iframe is blinking..
what i want is the the jquery, so i can put effect like Fade Out/ FadeIn, please help me with this one..

thank you!
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: convert this javascript code to jquery - help!

Post by jacek »

jQuery is JavaScript ! There is nothing to convert, it's the same language.
Image
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: convert this javascript code to jquery - help!

Post by bowersbros »

You can mix the two together, so fadeIn can be mixed with pure javascript. Since its just a library of prewritten javascript as a function, there is nothing wrong with doing that.
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Post Reply