Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 how to use javacall to set window size
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ukcorniel
Novice

4 Posts

Posted - 12 Aug 2005 :  13:33:00  Show Profile  Visit ukcorniel's Homepage  Reply with Quote


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  Show Profile  Visit s.dav's Homepage  Reply with Quote
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
Go to Top of Page

ukcorniel
Novice

4 Posts

Posted - 16 Aug 2005 :  01:49:56  Show Profile  Visit ukcorniel's Homepage  Reply with Quote
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
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 16 Aug 2005 :  08:42:38  Show Profile  Visit s.dav's Homepage  Reply with Quote
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
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 16 Aug 2005 :  08:43:18  Show Profile  Visit s.dav's Homepage  Reply with Quote
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
Go to Top of Page

ukcorniel
Novice

4 Posts

Posted - 16 Aug 2005 :  09:28:48  Show Profile  Visit ukcorniel's Homepage  Reply with Quote
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

Go to Top of Page

ukcorniel
Novice

4 Posts

Posted - 23 Aug 2005 :  21:51:56  Show Profile  Visit ukcorniel's Homepage  Reply with Quote
CAN ANYONE HELP WITH THE ABOVE??
Go to Top of Page

jtarin
Super User

Russia
444 Posts

Posted - 28 Aug 2005 :  04:35:45  Show Profile  Visit jtarin's Homepage  Reply with Quote
Se if this helps with your problem....(scroll down)
http://www.yourhtmlsource.com/javascript/popupwindows.html

Porky
www.pacificwavetour.com

Edited by - jtarin on 28 Aug 2005 04:36:55
Go to Top of Page

Edigital
Master

107 Posts

Posted - 28 Aug 2005 :  14:58:27  Show Profile  Visit Edigital's Homepage  Reply with Quote
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)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000