Controls Without A <FORM> Tag

Posted on 2007-07-26
Last Modified: 2010-04-09
Hi All,

In HTML/ASP can we have controls say a textbox control without a container I mean without a form tag.
If yes then how can I refer to it  in the page, I mean the control or its value say suppose I need to pass its value in the form of a querystring to another html/asp page.

Question by:bonnseye
    LVL 25

    Expert Comment


    I you need to contain it in a <form> in order to pass it's value
    LVL 16

    Accepted Solution

    Yes, it would be all JavaScript.

    I don't recommend this, because lot more work than necessary, and non-standard.  But, it could be done without forms.
    LVL 17

    Expert Comment

    Yes, I agree with golfDoctor; you could do it, but it would be all javascript and wouldn't work if the user doesn't have javascript on.

    I'd suspect you'd trigger off an onClick where you would take the values in the text fields and build a url with the parameters added to it and do a location.href update and the data would be passed to the new page as GET variables.
    LVL 25

    Expert Comment

    aye...I stand corrected.

    But as the others have said, it is javascript dependant, so if a user has turned off javascript in the browser, or has the security settings set high enough to block scripts from running, or if someone is sneaky and decides to download your page, and simply remove the won't be possible to do without the <form> tags...
    LVL 17

    Expert Comment

    Why do you want to do this without <form> tags?

    Author Comment

    sorry jasonbytes, I wanted to accept golfdoctor and yours as assisted, but unfortunately forgot to check and submitted, and realized when all was done. sorry once again

    Thanks & Regards,

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
    In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now