PDA

View Full Version : Stay On Top Content Script



Eddie
07-01-2009, 04:43 PM
1) Script Title: Stay On Top Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/stayontop.htm

3) Describe problem:

I have this working fine on Firefox, but when using this on my site on Internet Explorer I get the error message thats in the js file regarding the target id.. but the target ids are ajaxdiv thru all the different areas where needed.

so once uve pressed ok on the error box on IE the pop up box doesnt show.

Any ideas? or do u need any more info off me?

Thank you :)

ddadmin
07-02-2009, 04:50 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.

Eddie
07-02-2009, 12:22 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

link to my website/forum: http://bouncingbass.co.uk/bb/

Like I said, the error only appears on Internet Explorer not in firefox.

Also would like to know if there was away to make this only appear once during a session?

and even if there is like some code that could be used to make it not show up after a certain time of day..

thanks for your help on this :)

ddadmin
07-02-2009, 04:26 PM
Hmm at a glance the only issue I see is that you have an initialization call to a non existent SOT content. The following should be removed:


alwaysOnTop.init({
targetid: 'examplediv',
orientation: 3,
position: [5, 10],
fadeduration: [1000, 1000],
frequency: 0.95,
hideafter: 15000
})

If that doesn't help, try changing the value "ajaxdiv" both inside your HTML page and bc.htm to something else, for example, "myajaxdiv".


Also would like to know if there was away to make this only appear once during a session?

The "session" option within the invocation code does support once per browser session. Please refer to the script page.

Eddie
07-03-2009, 10:26 AM
Hi,

I removed that code that didnt need to be there, and also changed the targit id's to a different name, but still the same error appears..

Thank you :)

ddadmin
07-04-2009, 07:57 AM
Hmm that's strange. Try this. Inside the .js file, try finding the below lines:


success:function(content){
var $target=$(content)
if ($target.get(0).id==settings.targetid)
alwaysOnTop.positiontarget($target.appendTo('body'), settings)
else
alert('Error: The value you have entered for "targetid" ('+settings.targetid+') '
+ 'doesn\'t match the ID of your remote content\'s DIV container ('+$target.get(0).id+'). This must be corrected'
)
}

and replace that with just:


success:function(content){
var $target=$(content)
alwaysOnTop.positiontarget($target.appendTo('body'), settings)
}

Eddie
07-04-2009, 05:28 PM
thanks :)

that has got rid of the error, but doesn't show the coding working correctly like it does in firefox.

The image i added in doesn't appear, as well as the light blue background with outline, and the fonts aren't bold..

any ideas to correct this for internet explorer... as works perfect in firefox

Thanks for all ur help :)