Jump to content

Problems with a javascript.


Scrier

Recommended Posts

Well I've moved a site to a new host that is supposedly more stable than the last one we had, Although on the new site a return escape function has stopped working, think it's part of a wz_tooltip and I'm wondering why. I am guessing that some setting or something on the host is not up to date for some reason. The following example:

<a onmouseover="return escape('This is a test')"><h1>ITEMS</h1></a><br>

Does not give a mouseover at all and i'm wondering if anyone knows what might be wrong. Any help appreciated. (Note the code works on the old host but not the new)

Link to comment
Share on other sites

Maybe double quotes ? (didn't work)Ain't sure.But javascript should work on all hosts....

Link to comment
Share on other sites

Can post the generated code from the writeouts if it helps.This is the old site:

<tr valign=top>	<td bgcolor=#FFFFFF>		<a onmouseover="return escape('<div class=\'wowitem wowitemlive\'><span class=\'iname\'><span class=\'purplename\'>Handwraps of Flowing Thought</span></span><br />Binds when picked up<br />Hands<span class=\'wowrttxt\'>Cloth</span><br />106 Armor<br />+19 Stamina<br />+19 Intellect<br /><img class=\'esock\' src=\'/images/yellowsocket.png\' alt=\'yellow\' />  Yellow Socket<br /><img class=\'esock\' src=\'/images/bluesocket.png\' alt=\'blue\' />  Blue Socket<br /><span class=\'greyname\'>Socket Bonus: +3 Spell Hit Rating</span><br />Requires Level 70<br /><span class=\'itemeffectlink\'>Equip: <a href=\'http://wow.allakhazam.com/db/spell.html?wspell=17367\' class=\'itemeffectlink\'>Increases damage and healing done by magical spells and effects by up to 32.</a> </span><br /><span class=\'itemeffectlink\'>Equip: Improves spell hit rating by 12.</span><br /><br/><span class=\'akznotice\'>	</span></div>')"			href=item.php?itemid=848&type=99>Handwraps of Flowing Thought</a>	</td></tr>

And the new site:

<tr valign=top>	<td bgcolor=#FFFFFF>		<a onmouseover="return escape('<div class=\'wowitem wowitemlive\'><span class=\'iname\'><span class=\'purplename\'>Handwraps of Flowing Thought</span></span><br />Binds when picked up<br />Hands<span class=\'wowrttxt\'>Cloth</span><br />106 Armor<br />+19 Stamina<br />+19 Intellect<br /><img class=\'esock\' src=\'/images/yellowsocket.png\' alt=\'yellow\' />  Yellow Socket<br /><img class=\'esock\' src=\'/images/bluesocket.png\' alt=\'blue\' />  Blue Socket<br /><span class=\'greyname\'>Socket Bonus: +3 Spell Hit Rating</span><br />Requires Level 70<br /><span class=\'itemeffectlink\'>Equip: <a href=\'http://wow.allakhazam.com/db/spell.html?wspell=17367\' class=\'itemeffectlink\'>Increases damage and healing done by magical spells and effects by up to 32.</a> </span><br /><span class=\'itemeffectlink\'>Equip: Improves spell hit rating by 12.</span><br /><br/><span class=\'akznotice\'>	</span></div>')"			href=item.php?itemid=2&type=40>Handwraps of Flowing Thought</a>	</td></tr>

I can't find anything diffing them tbh but saving the files as htm I get various results on the new site but it works to put up the old site as htm and run it. So the return escape function works but for some reason the generated code (which is identical imo) won't work.

Link to comment
Share on other sites

Tried stripping away all "unceccecary" things (prolly stripped something I shouldn't) and got this:

<html><body>	<a onmouseover="return escape('will be 30 minutes late or so.');"><img src="images/note.gif" border="0"></a><script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script></body></html>

Now this works on the old site but not the new site. explain this to me please :)old sitenew site

Link to comment
Share on other sites

Your wz_tooltip.js files are different from one site to the other.http://www.crithappens.net/wz_tooltip.js

t_tj.onmouseover = new Function('e',					'tt_Show(e,'+					'"tOoLtIp' +i+''+j+ '",'+					((typeof t_tj.T_ABOVE != tt_u)? t_tj.T_ABOVE : ttAbove)+','+					((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay)+','+					((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""')+','+					((typeof t_tj.T_LEFT != tt_u)? t_tj.T_LEFT : ttLeft)+','+					((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX)+','+					((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY)+','+					((typeof t_tj.T_STATIC != tt_u)? t_tj.T_STATIC : ttStatic)+','+					((typeof t_tj.T_STICKY != tt_u)? t_tj.T_STICKY : ttSticky)+','+					((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+					');'				);

http://www.crit-happens.net/wz_tooltip.js

t_tj.onmouseover = new Function('e',					'if(window.tt_Show && tt_Show) tt_Show(e,'+					'"tOoLtIp' +i+''+j+ '",'+					((typeof t_tj.T_ABOVE != tt_u)? t_tj.T_ABOVE : ttAbove)+','+// THIS IS WHERE IT IS DIFFERENT					((typeof t_tj.T_CLICKCLOSE != tt_u)? t_tj.T_CLICKCLOSE : ttClickClose)+','+// =====================					((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay)+','+					((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""')+','+					((typeof t_tj.T_LEFT != tt_u)? t_tj.T_LEFT : ttLeft)+','+					((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX)+','+					((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY)+','+					((typeof t_tj.T_STATIC != tt_u)? t_tj.T_STATIC : ttStatic)+','+					((typeof t_tj.T_STICKY != tt_u)? t_tj.T_STICKY : ttSticky)+','+					((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+					');'				);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...