Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2007, 10:09 PM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to forward some action from javascritp

hi i have to forward to controller with javascritp my script is as below.

<html>
<head>
function fwd(field){
var val=field.value;
     if(val == 1){
        mypage.do //<----------- this is how i needed
     }
}
</head>
<body>
<html:select property="myPage" onchange=fwd(this)>
<html:option value="1">one</html:option>
<html:option value="2">one</html:option>
<html:option value="3">one</html:option>
</body>
</html>

thx in advance
Ajay
 
Old September 3rd, 2007, 09:08 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Ajay!!
I think you are trying to do like as
<html>
<head>
<script>
 function fwd(field){
 var val=field.value;

alert(val)
     if(val == 1){
        //mypage.do //<----------- this is how i needed
     }
}
</script>
</head>
<body>
<select id="myPage" onchange=fwd(this)>
<option value="1">one1</option>
<option value="2">one2</option>
<option value="3">one3</option>
</body>
</html>
hope this will help you

Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call DLL Method in Javascritp? URGENT!!!!!! prabhakar123 Javascript 26 November 28th, 2011 07:06 AM
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
using Javascritp with XSLT pure_m23 XSLT 8 September 7th, 2006 04:48 AM
Working with Forms and Popup window in Javascritp danieljava JSP Basics 0 November 20th, 2005 09:57 PM
Forward after Login ~Bean~ ASP.NET 1.0 and 1.1 Basics 1 July 14th, 2005 05:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.