473,624 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do I send value of textbox without using form tag and submit button

oranoos3000
107 New Member
hi
I want to send value of textbox without using form tag and submit button to another page? Is it possible with php ?
How do I get this thing work?
thanks alot
Mar 8 '09 #1
5 10133
Markus
6,050 Recognized Expert Expert
@oranoos3000
PHP does not interact directly with the browser. You'll need to use javascript to obtain the value of the textbox and then append it to the url (mimic GET).

I don't understand why you cannot use a form - they're there for the purpose of passing data to pages.
Mar 8 '09 #2
TheServant
1,168 Recognized Expert Top Contributor
Is it just to the following page? How does the user move to the next page? Seeing as you are not using a form (no $_POST), you have to use $_GET, as has already been said. I guess you could probably use AJAX to save the data in a database somehow so it can be called as a session variable on the next page, but using a form would be heaps easier!
Mar 8 '09 #3
oranoos3000
107 New Member
hi
thing that I want to do this is after write in textbox and without click button
value of textbox is send to next page without this value is added to url
I want to do this work with php and javascript without ajax
Is this possible?
thanks lot
Mar 10 '09 #4
Dormilich
8,658 Recognized Expert Moderator Expert
@oranoos3000
in simple words: no.
Mar 10 '09 #5
TheServant
1,168 Recognized Expert Top Contributor
To elborate on Dormilich's reply:
PHP is server side, as in once the page has been sent to the browser from the server, PHP is useless and has no control. PHP can process forms, use variables etc...
Javascript is the opposite. It only works once the page is sent and is entirely reliant on the browser. It can be used to auto fill forms and even submit forms for you. Because it is browser dependant, if your visitor has turned off javascript, is will not work at all.
AJAX is between these forms, so it can auto submit forms, process variables etc... It's simply an extension of javascript, so if you know javascript, AJAX isn't that much more work.

As I said, it is possible to submit forms on events, but it will require some user input like click a button or mousin/mouseout. Use google to find out how to submit forms with javascript to get an idea.

If you explain why you have all these restrictions we can tell you better ways to do it, because often there is a simpler way... Which we can only reveal if we know the problem.
Mar 10 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

24
77356
by: London | last post by:
Hello Can you help me. By ASP How can I get the dropdown(control'name)'s selected value? What is it's property'name?
1
3804
by: ritelman | last post by:
Hi I have one text field and one submit button. If I hit the submit button with a mouse the key/value pair key are properly submitted. However, if I just hit the enter key the page does get submitted however without the key/value pair of the submit button. I would accept that a user must click the button to submit the pair, but none of my other pages require that. It seems if I just hit the enter key it defaults to hitting the submit...
3
2194
by: Kassam | last post by:
Hi MVPs out there. I have constructed an order form and the users will enter the informtion. I now need to send the filled out form as an e-mail (body being the HTML with the fille din data) to a predefined e-mail address. I know how to use CDO. I don't want to go to another page to recontruct the HTML as the '.body' Thank you in anticipation. Kassam
6
2742
by: charlie_M | last post by:
I figured out via various help from this forum... EXAMPLE: onClick="document.forms.MYBUTTON.value='SIMPLE';document.forms.submit()" In my CGI I see "MYBUTTON" = "SIMPLE" and this works fine.... except that the element MYBUTTON must exist as a hidden field.
2
3110
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit is performed. How do I force the usercontrol to display the newly assigned date? I don't have this problem if I place the two dropdownlist and the year field directly on the aspx page.
3
10790
by: remya1000 | last post by:
i'm using ASP with MSAccess as database. i have two buttons and two textbox in my page. when i press my first button (First month) i need to display the current month in one textbox and last one months date in another textbox. and while pressing the second button (submit) i need to display the date displayed in the textbox as itself and the records between thoses two dates. if that date is still there in the textbox only i can sort the...
5
13848
by: shotokan99 | last post by:
for instance i do have this element but i dont have a <form>: <input type="Text" name="myname" id="myname" size="30"...> then i have this link: echo'<a href="mypage.php?name='.$myname.'...>Save</a>'; i want that $myname will the value of myname textbox. something like this: $myname= <the value of the textbox>
7
3349
Atran
by: Atran | last post by:
Hello, I use Html 4.0 in Dreamweaver program, to send an email, I know that I must put a Form, and I make the Form Action: mailto:MyEmail@hotmail.com Then I put to the Form three textboxes: 1- From Textbox. 2- Title Textbox. 3- Message Textbox. And I make a submit button to the Form.
2
3048
by: Archanak | last post by:
Hi, I have one common text box to get email id. I have 2 forms and both form action connects to different programs. I want to use this textbox value(i.e email id) only for both the forms. How can i get the value of text box and use it in both forms? <html>
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.