Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-01-2013, 04:36 AM   PM User | #1
kakashihatake2
New to the CF scene

 
Join Date: Mar 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kakashihatake2 is an unknown quantity at this point
How to Reload a javascript once

Hello,

Actually I am using Ajax in my wordpress site. The thing is when i open a post having a youtube video using ajax the video doesn't appear.

So what i want is, I want a reload code or a code which will reload the youtube video after the page loads using jQuery.

The script that i use to post youtube videos in my site is
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
					var params = { allowScriptAccess: "always", wmode: "transparent" };
					swfobject.embedSWF("' . htmlentities('http://www.youtube.com/embed/'.$atts['id'].'?enablejsapi=1&version=3&playerapiid='.$uuid.'&rel=0&controls=1&showinfo=1') . '", "'.$uuid.'", "'.$width.'", "'.$height.'", "9.0.0", null, null, params);
				</script>
				<div id="cp_container" class="cp_youtube">
					<div id="'.$uuid.'"></div>
				</div>
I could have used iframe, but because the swfobject in the script above is linked with another function, i can not replace it.

I am using the plugins Advanced Ajax Page loader and the Youtube Module of Cubepoints.
kakashihatake2 is offline   Reply With Quote
Old 03-02-2013, 10:18 AM   PM User | #2
pssingh1001
New to the CF scene

 
Join Date: Feb 2013
Location: new delhi
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
pssingh1001 is an unknown quantity at this point
Hi dear ;

I think . you can use this code#### location.reload();
method .

And in other term

How to Reload the Page With JavaScript

There are several ways to reload the current page using a button or other trigger. The examples below use a button click to reload the page but you can use a text hyperlink or any trigger you like.

<input type="button" value="Reload Page" onClick="window.location.reload()">

regards
prem
pssingh1001 is offline   Reply With Quote
Old 03-02-2013, 01:38 PM   PM User | #3
kakashihatake2
New to the CF scene

 
Join Date: Mar 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kakashihatake2 is an unknown quantity at this point
Actually I just want to reload the swfObject function in that javascript... I guess that will solve all the problems...

How can i do it jQuery... I urgently need to know...

I tried many things but i am unable to do it
kakashihatake2 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:31 AM.


Advertisement
Log in to turn off these ads.