 |
|
| View previous topic :: View next topic |
| Author |
Message |
danzig Corporal

Joined: 16 Apr 2003 Posts: 12
|
Posted: Thu Apr 24, 2003 9:16 pm Post subject: |
|
|
I cannot get a javascript file to work properly inside Nuke. I have tried the methods described on the following pages but I keep getting errors in the script (it works fine as a stand alone page).
http://nukeforums.com/forums/viewtopic.php?topic=11727&forum=17
http://nukeforums.com/forums/viewtopic.php?topic=11502&forum=30
I tried using NukeWrap with no luck. I also tried putting the javascript into the javascript.php include file with no luck.
Is there anything else I can try? I don't really know what info about the javascript to give apart from it just doesn't work properly inside Nuke.
<font size=-1>[ This Message was edited by: danzig on 2003-04-25 00:40 ]</font> |
|
| Back to top |
|
 |
|
|
 |
Humpa President

Joined: 23 Apr 2002 Posts: 3429
|
Posted: Fri Apr 25, 2003 2:56 am Post subject: |
|
|
Where are you trying to put the code?
Can I see?
What is the javascript you are trying to insert. |
|
| Back to top |
|
 |
danzig Corporal

Joined: 16 Apr 2003 Posts: 12
|
Posted: Fri Apr 25, 2003 4:44 am Post subject: |
|
|
Well, here's the page I'm trying to get working in a Nuke module:
I think you get the code from that page? i don't want to post it all here.
Here's the page in a Nuke module using the following index.php code:
| Code: |
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
if (!isset($mainfile)) { include("mainfile.php"); }
$module_name = basename(dirname(__FILE__));
$index = 1;
include("header.php");
OpenTable();
include("modules/Dutchbook/dutch_book.html");
CloseTable();
include("footer.php");
?>
|
I can tell the script's not working properly because the Amount$ field is set to zero when it should be at 100.
Since my initial post I've found the script does work properly using the NukeWrap module,
but it also creates problems with the table layout (iframes) and the script get displayed in the survey block on the right, and i'd rather have it in a normal module using the code above.
<font size=-1>[ This Message was edited by: danzig on 2003-04-25 07:46 ]</font>
<font size=-1>[ This Message was edited by: danzig on 2003-04-25 08:30 ]</font>
Last edited by danzig on Sat May 08, 2004 6:09 pm; edited 2 times in total |
|
| Back to top |
|
 |
Humpa President

Joined: 23 Apr 2002 Posts: 3429
|
Posted: Fri Apr 25, 2003 9:22 am Post subject: |
|
|
When I view source, I see that you have the javascript in the <head too.
Take the javascript code out of your includes/javascript.php (if that's where it is.
The code seems to work fine for me.
I just included the dutch_book.html page (though, I saved the dutch_book.html locally):
| Code: | <?php
include("header.php");
include("dutch_book.html");
include("footer.php");
?> |
http://www.humpa.com/news/tester2.php |
|
| Back to top |
|
 |
danzig Corporal

Joined: 16 Apr 2003 Posts: 12
|
Posted: Fri Apr 25, 2003 6:04 pm Post subject: |
|
|
I don't get it. I took the javascript out of the includes/javascript.php, I put the html page in the root folder (is that what you meant by saving it locally?) I changed the include in the index.php to like in your code and it still doesn't work.
When you say the javascript is in the <head, how do I get it out of there? Is that code you pasted the only code in the tester2.php? If not can you paste all of it please. The url to your test file doesn't look like it's a module, should I not run it from within a module? |
|
| Back to top |
|
 |
Humpa President

Joined: 23 Apr 2002 Posts: 3429
|
Posted: Sat Apr 26, 2003 10:36 am Post subject: |
|
|
I didnt have to save it locally. I only did that because I thought I was going to have problems getting it to work, so I wanted to be able to edit it.
And, I only made it a test page instead of a module because I'm lazy. They work exactly the same, and the code is indentical.
I made it a module, and I include the dutch_book.html right from your site:
http://humpa.com/news/modules.php?name=Testing
This is the entire code for the modules/Testing/index.php:
| Code: | <?php
include("header.php");
include("http://www.ozracetools.com/dutch_book.html");
include("footer.php");
?> |
[ This Message was edited by: Humpa on 2003-04-26 13:38 ] |
|
| Back to top |
|
 |
danzig Corporal

Joined: 16 Apr 2003 Posts: 12
|
Posted: Sat Apr 26, 2003 8:04 pm Post subject: |
|
|
This is crazy. I have it set up exactly as you do and it still doesn't work properly.
I tried changing themes but it still didn't work. The only thing I can think of is that when I edited the theme header and footer html files (3d fantasy theme) I've messed something up.
Header.hml
| Code: |
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-left.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/up.gif" align="center" width="100%" height="15"> </td>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-right.gif" alt="" border="0"></td></tr>
<tr>
<td background="themes/3D-Fantasy/images/left.gif" width="15"> </td>
<td bgcolor="7b91ac" width="100%">
<table border="0" align="center" bgcolor="#7b91ac"><tr><td>
<a href="index.php"><img src="themes/3D-Fantasy/images/logo.gif" border="0" alt="Welcome to $sitename" align="left"></a>
</td></tr></table>
</td>
<td background="themes/3D-Fantasy/images/right.gif"> </td></tr>
<tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-left.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/down.gif" align="center" height="15"> </td>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-right.gif" alt="" border="0"></td></tr>
</table>
$public_msg<br>
<table border="0" cellspacing="0" cellpadding="0" width="99%" align="center" bgcolor="#ffffff">
<tr><td bgcolor="#ffffff" valign="top">
|
Footer.html
| Code: |
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-left.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/up.gif" align="center" width="100%" height="15"> </td>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-right.gif" alt="" border="0"></td></tr>
<tr>
<td background="themes/3D-Fantasy/images/left.gif" width="15"> </td>
<td bgcolor="7b91ac" width="100%" align="center"><font class="tiny">$footer_message</font></td>
<td background="themes/3D-Fantasy/images/right.gif"> </td></tr>
<tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-left.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/down.gif" align="center" height="15"> </td>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-right.gif" alt="" border="0"></td></tr>
</table>
|
<font size=-1>[ This Message was edited by: danzig on 2003-04-27 01:51 ]</font>
Last edited by danzig on Sat May 08, 2004 6:10 pm; edited 1 time in total |
|
| Back to top |
|
 |
aaanativearts Lieutenant Colonel

Joined: 09 Jul 2001 Posts: 417
|
Posted: Wed Nov 12, 2003 11:38 pm Post subject: |
|
|
Here's what I have for the 3D-Fantasy header:
| Code: | <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-left2.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/up2.gif" align="center" width="100%" height="15"> </td>
<td><img src="themes/3D-Fantasy/images/up-right2.gif" width="15" height="15" alt="" border="0"></td></tr>
<tr>
<td background="themes/3D-Fantasy/images/left2.gif" width="15"> </td>
<td bgcolor="ffffff" width="100%">
<table border="0" align="center" bgcolor="#ffffff"><tr><td>
<a href="index.php"><img src="themes/3D-Fantasy/images/logo.gif" border="0" alt="Welcome to $sitename" align="left"></a>
</td></tr></table>
</td>
<td background="themes/3D-Fantasy/images/right2.gif"> </td></tr>
<tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-left2.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/down2.gif" align="center" height="15"> </td>
<td><img src="themes/3D-Fantasy/images/down-right2.gif" width="15" height="15" alt="" border="0"></td></tr>
</td></tr></table>
$public_msg<br>
<table cellpadding="0" cellspacing="0" width="99%" border="0" align="center" bgcolor="#ffffff">
<tr><td bgcolor="#ffffff" valign="top">
|
and for the footer.htm:
| Code: | </td></tr></table>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-left2.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/up2.gif" align="center" width="100%" height="15"> </td>
<td><img src="themes/3D-Fantasy/images/up-right2.gif" width="15" height="15" alt="" border="0"></td></tr>
<tr>
<td background="themes/3D-Fantasy/images/left2.gif" width="15"> </td>
<td bgcolor="ffffff" width="100%" align="center"><font class="tiny">$footer_message</font></td>
<td background="themes/3D-Fantasy/images/right2.gif"> </td></tr>
<tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-left2.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/down2.gif" align="center" height="15"> </td>
<td><img src="themes/3D-Fantasy/images/down-right2.gif" width="15" height="15" alt="" border="0"></td></tr>
</td></tr></table> |
|
|
| Back to top |
|
 |
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|