473,466 Members | 1,406 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why won't SRC work?

59 New Member
Hi
I am trying to run an external javascript that is on one of my other systems

When i view the source of the page the code i see is
Expand|Select|Wrap|Line Numbers
  1.  
  2. <SCRIPT language="JavaScript"> 
  3. document.write('<iframe width="400" height="200" allowtransparency="true" scrolling="no" frameborder="0" hspace="0" vspace="0" src="/websnips copy/index.php/widget/show/aHR0cDovL3d3dy5iYmMuY28udWsvbG9uZG9uL25ld3Mv/156"></iframe>');
  4. </SCRIPT>

I am trying to create a document like this
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="http://localhost:8888/websnips%20copy/index.php/widget/widget/aHR0cDovL3d3dy5iYmMuY28udWsvbG9uZG9uL25ld3Mv/156"></script>
  2.  
Which should embed the script above it, but it doesn't. Can anyone help me fix this problem?

Thanks
Nov 16 '08 #1
3 1199
Markus
6,050 Recognized Expert Expert
The .js file doesn't need <script ...></script> inside it: just the javascript code. Also, the src attrib should point to an actually .js file, I believe.
Nov 16 '08 #2
ojsimon
59 New Member
The .js file doesn't need <script ...></script> inside it: just the javascript code. Also, the src attrib should point to an actually .js file, I believe.
Problem is that it is an automated file and does not have any . extention so i need to define it as js?

Thanks
Nov 16 '08 #3
Markus
6,050 Recognized Expert Expert
Problem is that it is an automated file and does not have any . extention so i need to define it as js?

Thanks
Well, the file that is output needs a mimetype that is equivalent to text/javascript. Maybe you can use something like php to get the contents of that 'automated file' and output it to the browser between <script> tags.

Also, the language attribute is deprecated (ie don't use it). Use type="text/javascript" instead.
Nov 16 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Kerry Neilson | last post by:
For the past couple of months, Idle won't start when I invoke it. I am at a complete loss for why this is. When this happens, they python command line still starts, and python works fine...
1
by: Jim | last post by:
Hey guys I DESPERATLY need some help with this small javascript i have on this website. All that it's supposed to do is change the button image once it's pressed but alas... I copy-pasted the code...
3
by: DFS | last post by:
I've been working around this for years (I believe), so I figured someone here might know: Why won't a crosstab query accept a value from a form reference? TRANSFORM...
7
by: simon | last post by:
I have simple html(aspx) page, but vertical height won't work. Even if i had set the height of a table=100%, the table is not 100% height. I spend a lot of time(my real page is more...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
11
by: John Ortt | last post by:
Hi everyone. I have a database which I have developed in Access 2000 which is working nicely. The problem is that my customer only has Access 97. I tried to convert the database but the main...
7
by: Eran.Yasso | last post by:
Hi, I have project that automate excel(using Excel COM) which works fine in my home. I took the project from my home to work and tried to build the project but it won't built. I get error "The...
2
by: scitrenbaum | last post by:
Here is the dilemma. I have a website where everything works perfectly in all browsers except for Safari. When you are in Safari and you go to this page... ...
2
tpgames
by: tpgames | last post by:
Two days ago, MS office Word would type JP fonts, I thought. I didn't think I was using Works. Now, it won't type in JP. Jasc Paint shop pro 8, should type JP fonts because I am using XP, according...
4
by: z55177 | last post by:
My domain: http://www.esthevision.cz/ This is the cause of my problem. The template is supposed to look somewhat like this: PINK STRIPE http://themebot.com/website-templates/ht... I created an...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.