I tried it this way in the URL field:
but that doesn't seem to work.Code:javascript:my_close('KTEdit1');object.style.cursor = default;
How must it be written?
I tried it this way in the URL field:
but that doesn't seem to work.Code:javascript:my_close('KTEdit1');object.style.cursor = default;
How must it be written?
Depends on what you are trying to achieve.
I think you have to replace "object" with actual reference to the object that is supposed to have pointer changed.
John.
I'm basically faking the bahaviour of normal popups; when you click outside of the opaque area in the popup then the popup closes automatically.
In this case I'm using sticky popups and I have a transparent rectangle that represent the "outside" area; that has the my_close link, which I don't want to show a hand cursor.
Currently my URL is like here:
It doesn't show the correct cursor, but it doesn't wreck the link either (link works).Code:javascript:my_close('KTEdit1');this.style.cursor('pointer');
I see .
Think about it - your code sets cursor only when user clicks on it. Untill then, you still have the default one.
John.
are you saying there is no way to do it (or easy way) or are you playing riddles with me in order to teach me some javascript?
You've got it.
I would suggest using a placeholder instead.
where:Code:<img src="index_htm_files/blank.png" onclick="my_close('KTEdit1')" style="width:100%; height:100%;"></img>
index_htm_files/blank.png - a link to the 1x1px 99% transparent image;
my_close('KTEdit1') - your code.
John.
Thanks, looks like something even I can understand.
Could the same idea work if img was replaced with div and there would be no source?
No. The empty div is transparent to clicks, so you woun't be able to click on it.
John.
I will do it as you say, however the above code worked with Chrome, Firefox and Safari. IE refused to handle the div that had no content.Code:<div onclick="my_close('password1')" style="width:100%; height:100%; cursor:default;"></div>
John.
Bookmarks