Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 8th, 2004, 12:01 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
cant open a new window?

can anyone with my code? its within in a form: i need to click on the button to have a pop-up window and then the customer code will bring to the pop-up window, but seems my code doesnt work.

<head>
<script language="JavaScript">
function MM_openBrWindow(theURL,winName,features)
{
var id=document.form1.code.value;
window.open(theURL+"?code="+code,winName,features);
}
</script>
</head>

<form>
.
.
<td width="34%"><input name="code" value="" type="text" id="code"> </td>
.
.
<td><input name="btn1" type="button" onClick="MM_openBrWindow('addcontact.php','search1','scroll bars=yes,resizable=yes,width=500,height=500')" value="Search">


please help....

Reply With Quote
  #2  
Old May 8th, 2004, 06:46 AM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Client Side Things' by tkarkkainen.

Reason: JavaScript

Reply With Quote
  #3  
Old May 8th, 2004, 06:52 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: cant open a new window?

ok, on this line of the JS function

window.open(theURL+"?code="+code,winName,features);

your are constructing th URL with a variable called 'code' which does not exist. you are referencing the value of the textbox earlier on with this line...

var id=document.form1.code.value;

so your window.open call should look like this...

window.open(theURL+"?code="+id,winName,features);

(make sure your form is named 'form1' or you will get an error)

Change that and everything should work fine.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > cant open a new window?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT