Embedding Content Via Javascript
Aug 2, 2007
I am trying to embed content via javascript using the following code:
<script type="text/javascript" src="http://example.com/script.php"></script>
When I place the script.php in other servers it works fine (content can be viewed) except with one server, it doesn't return anything (just blank screen). What could be the possible problem, is it a hotlinking issue or something else?
View 8 Replies
ADVERTISEMENT
Jan 18, 2010
How to embed this flash so it will stay behind other content, e.g. a lightbox?
<td align="left" id="container" valign="middle" z-index="0"><!-- see notes for files included -->
<a href="[URL]">Get the Flash Player to see this rotator.</a>
<script type="text/javascript" src="my/path/to/file.js"></script>
<object><script type="text/javascript">
var s1 = new SWFObject("my/path/to/flash.swf","rotator","415","120","7");
s1.addParam("allowfullscreen","false");
s1.addVariable("file","my/path/to/file.xml");
s1.addVariable("width","415");
s1.addVariable("height","120");
s1.write("container","embed");
</script></object>
</td>
I am fine with embedding full flash but with this XML/javascript flash, I am truly lost.
View 2 Replies
View Related
Jul 21, 2007
I use a small piece of JS code to make different elements on the page show/hide when clicking a link, based on id:
function toggle( targetId ){
if (document.getElementById){
target = document.getElementById( targetId );
if (target.style.display == "none"){
target.style.display = "";
} else {
target.style.display = "none";
}
}
}
Then HTML looks like this:
<a href="#" onClick="toggle('news'); return false;">Show/hide news</a>
<div id="news" style="display:none">BlahBlahBlah</div>
This works. Initially the element is hidden (with style="display:none" property of the element), and the script gets its id and changes its display property to "block" when clicking on a link.
But when Javascript in a browser is turned off, the elements to show are all hidden, and there's no way to see the content of the element.
My question: is there a way to hide toggled elements on page load with JS, so that when it's turned off the hidden content is shown?
View 5 Replies
View Related
Jul 23, 2005
Here is another one - I am just soaking up all these new learnings!
I have the following piece of html
<IMG SRC="test.gif" WIDTH="320" HEIGHT="256" ALT="movie placeholder">
<BR>
<A HREF="test.mov">Interiors</A> |
<A HREF="althorpe1.mov">Interiors</A> |
<A HREF="althorpe2.mov">Exteriors</A>
I want to implement a little JavaScript that allows the picture to be
swapped for a virtual tour, a QuickTime mov file. Here is the syntax for
the test.mov file that should replace the test.gif
<EMBED SRC="test.mov" WIDTH="320" HEIGHT="256" BGCOLOR="E8E8E8" CACHE="true"
HOTSPOT66="NewMovie.mov" CONTROLLER="true"></EMBED>
Now you probably say .... listen dude, check out the 101 postings on
swapping images..... Well, just to make it a little more complicated, I want
to add the HOTSPOT functionality. When you make the QuickTime movie
(virtual tour - aka 360 view), you can identify hot spots. These are
basically areas that the user can click on to get the next virtual tour /
movie. Now, in test.mov, there is a hotspot66, when you click on it,you are
supposed to link through to NewMovie.html (which would contain
NewMovie.mov), but I want the same file to remain on the screen and
NewMovie.mov to be placed into the image area.
Seems that we have moved (prematurely of course) to JavaScript 102....
View 4 Replies
View Related
Dec 14, 2009
I am using the tinyslideshow and need to be able to embed a wmv file into it. It needs to open within the slideshow as the thumbnail loads and when clicked just as the image does. I have not been able to figure this out or know if it is possible
View 3 Replies
View Related
Feb 10, 2006
I am looking for a way to embed an IM window into a web page, so that
users can easily send an IM to a support person. I am looking for
something free and easily implemented, that doesn't require any client
download on the user's system. And supports one of the major IM
services like Gtalk, AIM, YIM, ICQ, etc.
Basically I want to provide very very simple answering of questions, so
along the lines of LivePerson without the cost and extra features.
View 2 Replies
View Related
Jun 21, 2010
embedding the youtube in my webpage by javascript.How the same can be done by java as there lot of API are given did any one done by using that tell me the step by step procedure for the same.
View 1 Replies
View Related
Nov 23, 2011
I have used this tool in order to display all my youtube videos.[URL]When you go over the thumbnail of one of the videos, you can see the title of each video (the title of the specific video in youtube).I want this title to be displayed before the thumbnail (above it).There are 4 JS files, 1 CSS and a small html code (all on the link provided).
View 1 Replies
View Related
Feb 9, 2011
The webpage I have created has embedded video (FLV). It was created in Camtasia from a PowerPoint presentation. Camastia has media controller with a srub line, however the person I designed this for want to be able to advance to the slide in the movie with a forward or back buttom.
View 5 Replies
View Related
Apr 22, 2010
I'm trying to embed a whole other external html document inside another using <script type="text/javascript" src="FILENAME.js" />.I've been led to believe that it is possible to do so, as long as I rename my html document with the .js extention.The first page loads, but the page being referenced won't load - am I trying to do the impossible?
View 4 Replies
View Related
Jul 23, 2005
I am embedding Spidermonkey in a C app. and I'm having trouble setting
class (not instance) property values. For example, I am setting up
the class as follows:
static JSBool constructor(JSContext *cx, JSObject *obj, uintN argc, jsval
*argv, jsval *rval)
{
printf("constructor argc = %d
", argc);
*rval = OBJECT_TO_JSVAL(obj);
return JS_TRUE;
}
main()
{
....
static JSClass my_class = {
"MyClass", JSCLASS_HAS_PRIVATE,
JS_PropertyStub,JS_PropertyStub,JS_PropertyStub,JS _PropertyStub,
JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub,JS_ FinalizeStub
};
static JSPropertySpec class_props[] = {
{"Prop1", 0, JSPROP_ENUMERATE},
{0}
};
JSObject *proto;
proto = JS_InitClass(cx, JS_GetGlobalObject(cx), 0, &my_class,
constructor, 1, NULL, NULL, class_props, NULL);
The above code correctly (verified through a JavaScript program). creates a new class with the Prop1 class property.
The following code correctly adds an _instance_ property:
jsval val = INT_TO_JSVAL(42);
JS_SetProperty(cx, proto, "MyProp2", &val);
After three days I still can't figure out how to set the value of the class
property, or, for that matter, create a new class property with a particular value. I am looking to do something like this:
jsval val = INT_TO_JSVAL(88);
JS_SetProperty(cx, ???, "Prop1", &val);
View 3 Replies
View Related
Jun 23, 2009
I've been trying to add embedded youtube videos to the carousel but so far without success. The videos are all over the screen, even when I wrap them in div. Has anyone ever done this and could help me?
View 2 Replies
View Related
Oct 30, 2011
how to Dynamically embedding youtube video?
View 1 Replies
View Related
Oct 26, 2009
I need to embed a small piece of javascript inside xslt. Basically I need to generate a hyperlink dynamically. I need to access xslt variables and use it in the javascript to create the hyperlink. Then in the xslt, I need to access the javascript variable containing the dynamically created hyperlink.
Here's the pseudo code I started with:
The above url then should look like this:
View 3 Replies
View Related
Jun 18, 2010
Issue that's preventing my video from showing in IE8.
It play's on all other IE versions...and plays fine in Firefox & Chrome.
View 1 Replies
View Related
Aug 25, 2006
I am working on a project that is using load balanced servers.. all the media that is referenced in the flash is referencing that server. but for some reason on our wireless at work we can't access that server... so I want to check to see if the swf file is existant on the server before writing out what swf to embed.. so if it is there, meaning we're not on wireless.. it will ebmed that one.. otherwise embed a different swf that will use that server's local copy of the site..
View 1 Replies
View Related
Nov 29, 2009
I'm doing embedding Windows Media Player with the HTML but I can not run the script through a different page. The following script that I made: file : player.html
<html>
<OBJECT id="VIDEO" width="640" height="480"
style="position:relatif; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<PARAM NAME="URL" VALUE="file_name.mpg">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="true">
[Code]...
View 3 Replies
View Related
Apr 8, 2011
I'm getting Error: Object doesn't support property or method 'addEvent' in my webpage. I'm trying to embed a flash carousel in an asp.net page and I have this, but nothing is showing on my page. Using IE9 and FF4
[Code]....
The xml has some settings for the images and all my images are in the upload folder in my project. I have reference to the swfobject js in the masterpage (head) and the homepage inherits from it: <script src="javascript/swfobject.js" type="text/javascript"></script>.
View 8 Replies
View Related
May 27, 2006
I've been driving myself crazy the past couple hours and can't figure this out. Here is what I need to do:
Have a select box like this:
<select name="dropdown">
<option value="option1">option1</option>
<option value="option2">option2</option>
</select>
Then when one of those options is selected, the appropriate div tag is displayed:
<div id="option1">
Div 1 Text
</div>
<div id="option2">
Div 2 Text
</div>
This seems like it should be really simple to do, but I can't figure it out.
View 5 Replies
View Related
Jul 28, 2007
I have a piece of code that I'd rather google's spider did not follow. Is
this possible please?
View 8 Replies
View Related
Mar 25, 2007
i made this javascript using the new "screen.width" property, which would make it easy to center content in a webpage no matter what the screen resolution is. Here it goes:
<html>
<head>
<script type="text/javascript">
function pos_center() {
var content = document.getElementById("carrier")
var width = screen.width
var contentwidth = content.offsetWidth
value = parseFloat((width - contentwidth)/2)
content.style.marginLeft = value }
</script>
</head>
<body
<div class="body" id="carrier">
</div>
</body>
</html>
The "body onload" makes the page first load all the way to the left, and then after completely loading switches the content to the center, that is dynamically gross.
Now, instead of using the "body onload", is there any other way that i can make the content appear. Seeing that there is no "onbeforeload", there must be another way to solve this.
View 1 Replies
View Related
Mar 26, 2003
This forum thread discusses the SitePoint article 'Re-Write a Layer's Content with Javascript' by Peter Todorov.
"How can you can replace the content of a Web page without additional requests to the server? The answer uses layers in JavaScript - Peter explains all."
View 17 Replies
View Related
May 4, 2005
I have a company that has a group of companies under it. I plan to add 4 company logos on one front page, and when the user mouses over one of the logos, I want a table below to change and show a description of that company.
The images that they will be mousing over will also need to change, and the table that will change should be able to carry a static message such as "Hover your mouse over the logos above to find out more".
View 7 Replies
View Related
Sep 29, 2005
I would like to build an HTML page that has four content areas. The first with 3 links that when clicked chage what is shown in the other 3 - and so changing the default content in these sections. The content for these sections will be contained in seperate HTML files sitting on the same server.
I understand this can be done without refreshing the page and believe JavaScript and Ajax is the best method to do this. Any advice?
View 2 Replies
View Related
Jun 26, 2007
I'm sure some wizard will tell me this is a classic example of "piece of cake"; in which case I bow and promise to listen In case I've struck granite rock, feel free to throw questions my way and I'll tell you if I've tried it or not.
I have a file, main.php (I know this is the JS-forum, bear with me). It outputs HTML and inline Javascript functions. When the user clicks on a graphical "tab", that tab is activated, and an ajax call is made to fetch.php with some specific parameters. Once the ajax request has completed, a given innerHTML container on the now active tab is filled with the stuff that fetch.php outputs.
So far so good.
The problem is that the stuff that fetch.php outputs is partial pure HTML and partial inline javascript. And this is where it gets tricky. If I declare an inline javascript function in the returned data, Firefox (and I suspect MSIE) refuses to understand that the function is there. It simply doesn't exist (!).
Using the Web Developer add-on for Firefox, there's an option to look at "Source code" and "Generated source code". The output from these two differ in that when I view the "Generated source code", I see the dynamically inserted javascript/HTML from fetch.php, whereas viewing "just" the source doesn't.
What did I do wrong? How do I get the browser to find/accept/activate the javascript code/functions that were inserted dynamically? I cannot put them in a .js file and include it, since they need to be dynamically created, and I cannot use eval() since that executes javascript "as is", in which a function will not be executed unless called.
View 5 Replies
View Related
Jul 23, 2005
How can I scoll the content of an Ifram to a desire Position?
The function should be:
window.scrollTo(x,y)
BUT how do I have to use this function so that applies to the IFrame content.
View 1 Replies
View Related