Author |
Topic |
|
ukcorniel
Novice
4 Posts |
Posted - 12 Aug 2005 : 13:33:00
|
hi there
really enjoying using Dynamic HTML Editor ..... can anyone give me some coding so i can use the javacall function in the events section to open a link in a new window of a set size?
that would be great!
cheers,
ukcorniel
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 13 Aug 2005 : 11:30:04
|
Simply add a SCRIPT tag to the header of your page like this and call a the javascript function
<SCRIPT LANGUAGE=javascript> <!--
function myWin(url) { window.open (url, "poll", "width=400,height=200,scrollbars=yes,resizable=yes,menubar=yes,status=yes,titlebar=yes,toolbar=yes"); }
//--> </SCRIPT> |
Regards, Davide |
|
|
ukcorniel
Novice
4 Posts |
Posted - 16 Aug 2005 : 01:49:56
|
thanks for your response.....and sorry to bother you again....there's something not clear to me
i want to use this to have a link on my page open up in a new window (for example a picture) but to make it look better i want to window to fit the picture and not just have lots of empty window space all around it.....
what do i have to do to get this....... do i put the code you provided in the head html code? if so what do i put in for the JavaCall in the events section of my link....
sorry....i'm just not very good at Java at all..... all i know is that you define a function at the top of the page and then when you want to use it you refer to it with the appropriate link ..... so to make things clear:
can you tell me what to put as the head html code and then what to put as de individual JavaCall's for the different links?
thanks a lot for your help and sorry to bother again!
corniel |
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 16 Aug 2005 : 08:42:38
|
In the SCRIPT/EVENTS setting of your page properties click the button "Header Code" and paste the code above.
The create an event "OnClick "and in the "JavaCall" field put myWin('http://www.mysite.com')
The code to resize a window based on a picture is very simple but varies from browser to browser... You should go to HTML site ans search for pre-made script for that. I remember also that TUCOWS.COM has a such thing when showing the preview of programs. |
Regards, Davide |
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 16 Aug 2005 : 08:43:18
|
quote: Originally posted by s.dav
In the SCRIPT/EVENTS setting of your page properties click the button "Header Code" and paste the code above.
The create an event "OnClick "and in the "JavaCall" field put myWin('http://www.mysite.com')
The code to resize a window based on a picture is very simple but varies from browser to browser... You should go to HTML site ans search for pre-made script for that. I remember also that TUCOWS.COM has a such thing when showing the preview of programs. You should see the code of this site by opening a preview and viewing the HTML code of the preview window.
|
Regards, Davide |
|
|
ukcorniel
Novice
4 Posts |
Posted - 16 Aug 2005 : 09:28:48
|
thanks for your quick reply.....gave it a try and i'm really sorry but it just doesn't want to play the trick when i do it
i've done everything you said but it didn't work. I have saved what I've done in this file http://www.hottest-host.com/ukcorniel/test.dhe
maybe - if you have a spare minute - you could see what is wrong with it...
thanks a lot once again and sorry to be a pain!!
corniel
|
|
|
ukcorniel
Novice
4 Posts |
Posted - 23 Aug 2005 : 21:51:56
|
CAN ANYONE HELP WITH THE ABOVE?? |
|
|
jtarin
Super User
Russia
444 Posts |
|
Edigital
Master
107 Posts |
Posted - 28 Aug 2005 : 14:58:27
|
Hi!,
I just downloaded the file TEST.Dynamic HTML Editor. And i think i found the problem!
1. You have to put this code (note: exactly code) <SCRIPT LANGUAGE=javascript> <!--
function myWin(url) { window.open (url, "poll", "width=400,height=200,scrollbars=yes,resizable=yes,menubar=yes,status=yes,titlebar=yes,toolbar=yes"); }
//--> </SCRIPT> in the header section
DON'T REPLACE the word "url"! You've changed 'http.....' so, the javacall wont work! in that way..
And also for the line window.open (...url ) don't replace url because Java will do it for you..
That's all.
I've tested and work fine!
Regards
Nestor
P.D : In order to see the function working you must export your page. (F12)
|
|
|
|
Topic |
|