Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expected ; JS Error on SRC tag with external URL

Status
Not open for further replies.

palchuri

Programmer
Apr 22, 2005
17
US
Hi,
I have a requirement to invoke external js on a given JSP.

This is how I am including the javascipt.

<script language="javascript" src="
I am getting the following error.

Line 4
Char 13
Expected ;
Code 0
URL xxxxxxxxxxxxx

Strange thing is when I remove from src url, I am not getting any JS error.
<script language="javascript" src="
Any reason why I am getting JS error with as part of url.


Any suggestions will be appreciated.


Regards
Shri
 
The only reasons I can think of would be:

- The MIME type is being sent differently between the two URLs

- The content of the two JS files is different

- One of the URLs delivers no JS, so no error is thrown, meaning the JS has errors in it when it is served

Why not give us real URLs so we can give you real help?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
In the same JSP file I am changing the SRC URL. This is JS located on external application, I don't even know what would be the content of JS file. I can't reach from our dev environment.

Still my question is why I getting error during the include because I am not invoking any functions on the JS file.

<script language="javascript" src=" -- JS Error

<script language="javascript" src=" -- No Error

The pattern what I observed is after the protocol https://
if it has something like I am getting this error. If I change the url to then no errors. For some reasons it does n't like ...etc

Any suggestions will be appreciated.

Regards
Shri
 
I don't even know what would be the content of JS file. I can't reach from our dev environment.

Well if you can't reach it, the your app sure as hell won't be able to.

Are you saying that if you put the URL of the JS file in a web browser, you get a 404?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Snippet which is giving JS error.

<tr>
<td align="right">
<%if(_ddStatus == ARebalanceLookup.DOC_DEVELOPER_ENABLED){ %>
<script language="javascript" src=" ---This part is giving error? Error apprears on window status bar with ; expected.
</script>
<%} %>
</td>
</tr>


Snippet no error

<tr>
<td align="right">
<%if(_ddStatus == ARebalanceLookup.DOC_DEVELOPER_ENABLED){ %>
<script language="javascript" src=" --- No Error
</script>
<%} %>
<</td>
</tr>

Both URL's are not reachable from Dev Environment.

The only difference is first url has while as second one has
Let me know if additional information is required.
Shri
 
You are correct, looks like it is bacause of authentication.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top