DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • June 25, 2016, 07:02:23 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: window.open  (Read 3525 times)
0 Members and 1 Guest are viewing this topic.
Dannic
Guest
« on: April 10, 2005, 06:59:30 PM »

Any idea how to open a new window similiar to mail or petition?

Basicly I am trying to make it so that when you click on an image a window will open up with some text.  The text that appears will depend on the image.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: April 10, 2005, 07:06:03 PM »

Code:
addnav("Popup",400,500,"runmodule.php?module=blah");
Then, you would have the popup_header and popup_footer instead of page_header/footer. Of course, you would just need to have a html tag, which would be:
Code:
rawoutput("<a href='runmodule.php?module=blah' target='_blank'>");
rawoutout("<img src='/blah.jpg'>");
rawoutput("</a>");

Then, at the end of your link, have the corresponding image thing, and in the module:
Code:
switch ($image){
case "booh":
output("This is a cool thing.");
break;
}
« Last Edit: April 10, 2005, 07:09:07 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #2 on: April 10, 2005, 07:10:31 PM »

not what i'm looking for.  

here is what I was trying to do.

Code:

rawoutput("<table width = \"100%\"><tr><td width=\"100%\" align = \"center\"><a href='./modules/creatureaddon.php&op=desc' target='_blank' onClick=\"./modules/creatureaddon.php&op=desc;return false;\" class='hotmotd'><img src=\"./images/".get_module_objpref("creatures",  $args['creatureid'], "image")."\"></a></td></tr></table>");

Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: April 10, 2005, 07:12:29 PM »

Oh... this would be fun...

Code:
// execute all your code
addnav("",400,500,./modules/creatureaddon.php&op=desc' target='_blank' onClick=\"./modules/creatureaddon.php&op=desc;return false;\" class='hotmotd');
« Last Edit: April 10, 2005, 07:13:32 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #4 on: April 10, 2005, 07:13:27 PM »

well the window opens except that I get a bad nav.  I am trying to do this in the middle of combat.
Logged
MightyE
Global Moderator
Captain of the Guard
*****
Offline Offline

Posts: 104


Game Creator MIGHTYE


View Profile
« Reply #5 on: April 12, 2005, 10:00:38 AM »

Code:
rawoutput("<a href='somepage.php' onClick=\"".popup("somepage.php")."; return false;">");
That'll give you the popup you want.  In somepage.php, use popup_header() and popup_footer() instead of page_header and page_footer.

Also, you will have to either addnav() the somepage.php, or before you include("common.php"), you'll have to define("OVERRIDE_FORCED_NAVS",true);

Please note, if you go with the define route, the forced nav system will not protect that window, meaning that you can't rely on the game enforcing whether or not the user was actually given that link.
Logged
Dannic
Guest
« Reply #6 on: April 12, 2005, 04:24:48 PM »

I get the popup ok.  The issue I think I am having is that I am trying to call it during creatureencounter.

I am trying to call the module itself and execute the code in it depending on the creatureid.

Basicly I am trying to avoid outputing a description of the creature unless the user clicks on the image or a link.  Once they do then the popup window will give that description.

I guess I could just make some javascript for it.
Logged
Freeze
Guest
« Reply #7 on: April 12, 2005, 04:28:41 PM »

How would this work, persay, to adding a nav at the top of the page, like the Motd, for rules? instead of a link in the village, i would like to have it next to the motd, but i'm nost certain which files to edit.
Logged
Dannic
Guest
« Reply #8 on: April 12, 2005, 04:30:15 PM »

for the creature description?  no it would be a link attached to the image or a link called "look closer" under the creature name probably.
Logged
Freeze
Guest
« Reply #9 on: April 12, 2005, 05:04:07 PM »

Not for that, but the same principle may apply. I would like another MoTD, but it be rules, not a motd. am i making any sence? or should this be another thread? I thought it might go here, since its the same theory.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #10 on: April 12, 2005, 05:12:44 PM »

Edit the template.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #11 on: April 12, 2005, 05:34:28 PM »

Edit the template.

Not an option.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #12 on: April 12, 2005, 05:37:14 PM »

Not an option.

Nah, I was talking to Xander.

And yes Xander, use your head... different subject = new thread.
« Last Edit: April 12, 2005, 05:37:51 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

SaucyWench
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #13 on: April 13, 2005, 02:37:39 AM »

well the window opens except that I get a bad nav.  I am trying to do this in the middle of combat.
The reason it badnavs is the allowed navs... that page wasn't in it. Eric's suggestion is how you get around that.
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
Dannic
Guest
« Reply #14 on: April 13, 2005, 04:11:31 AM »

I've tried it that way too.  I need to pass the variable as well.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
32 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search