Alpha_AI
asked on
The javascript function does not load
Hello,
This javascript function does not load?
<script language="javascript" src="ajax.js">
</script>
<td align="center" onMouseOver="this.classNam e='cell_ov er';" onMouseOut="this.className ='cell_out ';" bgcolor="#FFFFCC"><a href="javascript:getRating ('<?=$rows _articles[ 'articles_ id']?>','a rticle_rat ing')" class="narmal_nav">Vote!</ a></td>
When you mouseover on a td, the td changes color and when i click on the hyperlink which is inside the td cell, it is supposed to load a javascript function which is sitting in my ajax.js file
Article_ID is the number of the article and the article_rating is div that i am wishing to replace.
I think i have my syntax wrong somewhere. If i have, can someone give me some pointers to follow?
Ben
This javascript function does not load?
<script language="javascript" src="ajax.js">
</script>
<td align="center" onMouseOver="this.classNam
When you mouseover on a td, the td changes color and when i click on the hyperlink which is inside the td cell, it is supposed to load a javascript function which is sitting in my ajax.js file
Article_ID is the number of the article and the article_rating is div that i am wishing to replace.
I think i have my syntax wrong somewhere. If i have, can someone give me some pointers to follow?
Ben
ASKER
no the ajax.js file is in the include folder (which is a child folder)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Neither works
When i look in the bottom hand corner of my browser the hint is there and it says
javascript:getRating('20', 'article_r ating')
the 20 is the article id so should it be an integer instead of typecasted as a string?
Ben
When i look in the bottom hand corner of my browser the hint is there and it says
javascript:getRating('20',
the 20 is the article id so should it be an integer instead of typecasted as a string?
Ben
Are you just looking to change the color scheme of your site when a button/link is clicked ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
otherwise it should work. you could write A tag differently as:
<a href="#" onclick="javascript:getRat