Current location: Hot Scripts Forums » General Web Coding » JavaScript » running 2 scripts


running 2 scripts

Reply
  #1 (permalink)  
Old 01-16-04, 09:54 AM
skipper23 skipper23 is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Smile running 2 scripts

Hello all,
I get a page with errors when I put...
<SCRIPT LANGUAGE="JavaScript" SRC="http://exittraders.com/jsexit/roitan.js"></SCRIPT>
...with the java script thats already on my page...
Code:
 
<head>
<script language="JavaScript1.2">
var cssdefinition='<style>\n.menuitems{\nborder:2.5px solid #000000;\n}\n\n.menuitems a{\ntext-decoration:none;\ncolor:72ABFF;\n}\n<\/style>'
if (document.all||document.getElementById)
document.write(cssdefinition)

function over_effect(e,state, bgcolor){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
else{
while(source4.tagName!="DIV"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
}
}
}
</script>
<style>
   <!--
    body {margin: 32px; color: black; background-color: white}
    a {color: #ffffff}
    a:hover {color: #0000ff; text-decoration: none}
    a.title {font-weight: bold}
    td {font: 12pt arial}
    td.small {font-size: 10pt}
    font.url {font-size: 10pt; color: #ffffff}
   </style>
</head>
I'm only a cut and paste page builder (noob) so be gentle.
Regards
Skipper23
Reply With Quote
  #2 (permalink)  
Old 01-17-04, 09:59 PM
cshark's Avatar
cshark cshark is offline
Wannabe Coder
 
Join Date: Jan 2004
Location: Indianapolis
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
This code looks okay at a glance.

Can you be a little more specific?
What does the error say?

My guess off hand is that the first and second scripts are probably trying to use one or more of the same variable names. Usually pretty easy to fix.
__________________
Later
Cshark

Try <a href="http://shorthand.org">Shorthand</a>, an exciting new language for web applications.
Reply With Quote
  #3 (permalink)  
Old 01-18-04, 11:06 PM
skipper23 skipper23 is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Conflict

When the page is uploaded with both scripts it has
a little triangle in the bottom left corner, just says
done but with errors on page(and no exit page is made).
Theres a conflict, I just dont have a clue how to fix it.
Reply With Quote
  #4 (permalink)  
Old 01-19-04, 01:18 AM
cshark's Avatar
cshark cshark is offline
Wannabe Coder
 
Join Date: Jan 2004
Location: Indianapolis
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Right.
If you double click that triangle, it should give you a summary if the error, or errors that are in the page. If there are multiple errors in the page, the interface will give you forward and back buttons so you can view details of every error.
__________________
Later
Cshark

Try <a href="http://shorthand.org">Shorthand</a>, an exciting new language for web applications.
Reply With Quote
  #5 (permalink)  
Old 01-19-04, 01:49 PM
skipper23 skipper23 is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
errors

cool, learn something new everyday...
says...

Line: 2
Char: 1
Error: Syntax error
Code: 0
URL: http://www.ipirates.com/index.htm

Previous and next tabs are zeroed out.
Kind Regards
skipper23
Reply With Quote
  #6 (permalink)  
Old 01-20-04, 07:53 PM
skipper23 skipper23 is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone know what this means?
Line 2 is <HTML> I guess?
I've read other places that running 2 scripts you have to put <body onload script1 something script2>, anyone?
Kind Regards
skipper23
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What are nullified scripts kaustubh Script Requests 14 03-30-05 06:18 AM
Disappearing sponsored scripts BosDev HotScripts Site Bug Reports 3 01-22-04 05:43 PM
Running Perl scripts under Microsoft IIS retrocom Perl 3 08-23-03 04:38 PM
Folder access counting scripts? RageWinter22 Script Requests 0 07-20-03 12:15 PM


All times are GMT -5. The time now is 11:46 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.