form

Javascript: Enter for submit

Hello this is what i have in the head of my file: function entsub(event) { if (event && event.which == 13) write1(); else return true; } and in the body, my form is: <form id="writeform" name="writeform"> Message: <br /> <textarea name="message" rows="3" id...

PHP email text to gmail account

Is there some way I can take text (retrieved from a form), and email it to my gmail account? I can also have the user enter their email address, and a subject. Or if not is there a better way to have users send me a message? Thanks. ...

How to preserve hyperlink when submitting via php form into MySQL

Hi All, I've created a form that stores free text fields into a MySQL database. All works fine and the data is displayed back as intended when viewed. Except for one niggle. In an attempt to prevent malicious attacks I have used mysql_real_escape_string to remove any unwanted code from the input. However, I need to be able to preserv...

When editing a text input, how do I do a specific JavaScript action on hitting "Enter" key without the form's onSubmit handler?

I have an HTML input text field. How can I perform a specific JavaScript call when hitting "Enter" button while editing that field? Currently, hitting "Enter" reloads the entire page, presumably due to submitting the entire form. NOTE: This HTML/JS code is merely included as a portlet into a large HTML page for a portal, which has one...

jqGrid editing ONLY through form mode

Hi In my grids on the page, all of them need to not only have inline edit disabled, but ALSO should be editable via the modal form ONLY. However, turning editable : false, while preventing in-line edits, also prevents editing via the form (no columns can be seen on the form, just the Submit and Cancel buttons) How can I effect this be...

Set the actual value attribute of an input with jQuery

I am trying to reset the actual value attribute of an input so that it can be reset back to that value if reset, not necessarily the original value when the form was loaded. The problem is these changes don't seem to take effect. I have tried both: $(this).attr('value', $(this).val()); as well as.... $(this).val($(this).val()); Neit...

Struts form and variable declarations

Hi everyone, I have a question and I hope somebody can help me out here. Well, I'm developing an application with Struts 1.3.10 and I have a struts form with an object that contains a property. That property is declared as the primitive type int and the problem comes when the app shows to the user zeroes(0) instead of nothing when I ret...

Make php date dropdown function 'sticky'

Out of coffee and brain's given up... ...can anyone help to make this form date dropdown function retain selected month on $_POST ['submit'] or isset($missing) in the case of there being an error/missing field etc function createMonths($id='month_select', $selected=null) { /*** array of months ***/ $months = array( ...

Javascript: Form filling

Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1(); } Is this correct? Especially i want to know if i did function onLine(code,nn) (2 different values) correct. Can someone say so? EDIT: ...

Pass HTML form entries into a Javascript array to then be written to a client side cookie?

I'm building a bit of a test-case JS application, something very basic, but have run into some problems. I'm trying to use a HTML form for a user to enter a number, which is then written to a Javascript Array. The user then has the option to write that same array to a local (client side) cookie. (I understand the security implications ...

How to check if window is really visible in Windows Forms?

Hello, Normally you use Form.Visible to check if Window is visible at all. But sometimes on the screen window is below other windows so it's really invisible. So how to check in c# Windows Forms if window is really visible or not? I would like to accomplish this: when I click CTRL+K on my keyboard and my window is visible on my screen...

HTML-PHP Uploader Query

well, for a college project I'm designing an uploader site (u give it a file, it uploads it...kinda like imageshack or mediafire). Anyway, I got the whole thing working well with a html form and a php script to store the uploaded file in a "/uploads" folder. now here's the thing.....I want to have a drop down list in HTML section, and d...

How to add scroller around table using html and javascript?

i am designed a dynamic table for getting input from user.each column of table contains different types of fields like text box,drop down,check box etc.what should i do to add scroller around table.i searched it on internet but i could only get a solution for plan text in table.and other solutions were too much complicated .if u can refe...

iPhone Make POST request, handle cookie

I'm hoping someone can shed some light on the following, I think I am heading in the right direction with this. I want to login to my server with a user/pass combo, then I need to be able to tell If I logged in correctly (a cookie should be dropped), then I will make another request if this is the case. Any help appreciated, heres the c...

cakephp + cache + formhelper inside <cake:nocache></cake:nocache> = error

in all my views i have a login/register (cake)form. my question: can i use the file cache engine with <cake:nocache>form</ cake:nocache> 1.) open url "www.domain.com/home" 2.) cachefile generated 3.) look perfect 4.) refresh (f5) 5.) error (when debug=1): Parse error: parse error in C:\xampp\htdocs\cake_1.2.3.8166\app\tmp\cache\...

C# Save WinForm or Controls To File

I have been working on an application which allows the user to make a label template for printing purposes by adding label controls to a panel(which I use as a container). I have reached the point where I need to be able to save the template to a file which I can load into memory later for printing. Since the form is not serializable d...

Using a form token when user isn't logged in

I noticed that a lot of sites send a random token with form posts even though the user is not logged into a service requiring authentication. I understand the use of a token when you have an authenticated session, but what is the point in sending one when they aren't authenticated? Is it common practice to create a session when a user ...

How can JQuery validate() be executed before onClick="functionname()";

A form, I use AJAX to transfer the data. The AJAX is triggered by onClick="", I also use JQuery validate(). JQuery validate() is executed after the onclick=“function()", I would like the JQuery validate() is executed before the onclick="functionname()", how to do it? <?php $addtext=<<<html <a id="give_comment" href="javascript:void(0)">...

Ajax call to parent window after form submission

Hi all, Pardon the complicated title. Here's my situation: I'm working on a Grails app, and using jQuery for some of the more complex UI stuff. The way the system is set up, I have an item, which can have various files (user-supplied) associated with it. On my Item/show view, there is a link to add a file. This link pops up a jQuer...

Form submit and Ajax call

I am having a problem when submitting a form. Here is the situation <form ....> <input type="text" id="ajax"> <img onclick="saveTextBox"> <input type="text"> <input type="text"> <input type="text"> </form> In the above form when the img is click on I call an Ajax script to save the button. That's OK. What I need i...