You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 75 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Adding Javascript to sample addon module [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
paris
Nuke Soldier
Nuke Soldier


Joined: Jun 01, 2003
Posts: 32


PostPosted: Sun Jun 08, 2003 10:22 pm Reply with quoteBack to top

having a hard time getting a javascript popup to work in the addon sample module have used the following code

$someVarName = <<<_JSCODE_
<script>function openpopup(){
var popurl="/php/calender/cal.html"
winpops=window.open(popurl,"","width=500,height=400,")
}</script>
_JSCODE_;

Also

HTML_CONTENT tags

and other things have found in the forums I have see that there are numerous posts about it have searched the forums and have not found any code that works they all seen to be for blocks not modules any help would be great ,,,
Find all posts by parisView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Jun 09, 2003 4:50 am Reply with quoteBack to top

It works in both. As explained in my articles, you need to add an
echo $someVarName;
to get your code passed to the browser.

You also are missing a ; at the end of your var statement inside your function Smile

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
paris
Nuke Soldier
Nuke Soldier


Joined: Jun 01, 2003
Posts: 32


PostPosted: Mon Jun 09, 2003 11:34 am Reply with quoteBack to top

Just cant seem to get a simple pop up to work grrrr

echo $someVarName = <<<_JSCODE_

<script>function openpopup(){
var popurl="/php/calender/cal.html";
winpops=window.open(popurl,"","width=500,height=400,")
}</script>

_JSCODE_

LINK CODE
echo "<li><a href=\"javascript:popUp('/php/calender/cal.html')\">Calender</a>";

this all works on regular html pages thanks for your response I know you prly get tired of answering the same questions over and over thanks for your time and paitence its much apperciated Smile

_________________
______________
Secure & Speed up the Nuke: http://www.cpgnuke.com/
Coppermine Photo Gallery which can be installed as 100 modules http://cpgnuke.com/
Find all posts by parisView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Jun 09, 2003 12:36 pm Reply with quoteBack to top

Quote:
echo $someVarName = <<<_JSCODE_

<script>function openpopup(){
var popurl="/php/calender/cal.html";
winpops=window.open(popurl,"","width=500,height=400,")
}</script>

_JSCODE_

You put the echo in the wrong place and are missing 2 ; .. Try this
Quote:
$someVarName = <<<_JSCODE_

<script>function openpopup(){
var popurl="/php/calender/cal.html";
winpops=window.open(popurl,"","width=500,height=400,");
}</script>

_JSCODE_;
echo $someVarName;

And make sure there is nothing except a carriage return after each _JSCODE_ statement.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff

Last edited by Raven on Tue Jun 10, 2003 2:02 am; edited 1 time in total
Find all posts by RavenView user's profileSend private messageVisit poster's website
paris
Nuke Soldier
Nuke Soldier


Joined: Jun 01, 2003
Posts: 32


PostPosted: Mon Jun 09, 2003 8:28 pm Reply with quoteBack to top

Worked like a charm thanks Raven *hands Raven a case of Pepsi, and I wana say that nuke cops is the most organized most helpful nuke site. Thanks again nuke cops and raven save the day:)
Find all posts by parisView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.181 Seconds - 341 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::