Search Results

Search found 430 results on 18 pages for 'maxlength'.

Page 7/18 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Set default form textfield value (webbrowser control/DOM Javscript)

    - by Khou
    Hi I would like my application to load a webpage and set default the form textfield value a predefine value. Requirements: -The application is a windows form, it is to use the web browser control, to load a web page. -Textfield values are define by within the application. -When textfield on the webpage matches the applications predefined elements, the predefine fixed value is set and can not be changed by the end user. Example If my application defines element "FirstName" equal to value "John", the text field for value for element "FirstName" will always equal "John" and this value can not be changed by the end user. Below is html/javascript code to perform this functionality, now how do I implement this in a windows form? (without having to modify the loaded webpage source code (if possible). HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>page title</title> <script script type="text/javascript" src="demo1.js"></script> </head> <body onload="def(document.someform, 'name', 'my default name value');"> <h2 style="color: #8e9182">test form title</h2> <form name="someform" id="someform_frm" action="#"> <table cellspacing="1"> <tr><td><label for="name">NameX: </label></td><td><input type="text" size="30" maxlength="155" name="name" onchange="def(document.someform, 'name', 'my default name value');"></td></tr> <tr><td><label for="name2">NameY: </label></td><td><input type="text" size="30" maxlength="155" name="name2"></td></tr> <tr><td colspan="2"><input type="button" name="submit" value="Submit" onclick="showFormData(this.form);" ></td></table> </form> </body> </html> JAVASCRIPT function def(oForm, element_name, def_txt) { oForm.elements[element_name].value = def_txt; }

    Read the article

  • Set default form textfield value (webbrowser control)

    - by Khou
    Hi I would like my application to load a webpage and set default the form textfield value a predefine value. Requirements: -The application is a windows form, it is to use the web browser control, to load a web page. -Textfield values are define by within the application. -When textfield on the webpage matches the applications predefined elements, the predefine fixed value is set and can not be changed by the end user. Example If my application defines element "FirstName" equal to value "John", the text field for value for element "FirstName" will always equal "John" and this value can not be changed by the end user. Below is html/javascript code to perform this functionality, now how do I implement this in a windows form? (without having to modify the loaded webpage source code (if possible). HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>page title</title> <script script type="text/javascript" src="demo1.js"></script> </head> <body onload="def(document.someform, 'name', 'my default name value');"> <h2 style="color: #8e9182">test form title</h2> <form name="someform" id="someform_frm" action="#"> <table cellspacing="1"> <tr><td><label for="name">NameX: </label></td><td><input type="text" size="30" maxlength="155" name="name" onchange="def(document.someform, 'name', 'my default name value');"></td></tr> <tr><td><label for="name2">NameY: </label></td><td><input type="text" size="30" maxlength="155" name="name2"></td></tr> <tr><td colspan="2"><input type="button" name="submit" value="Submit" onclick="showFormData(this.form);" ></td></table> </form> </body> </html> JAVASCRIPT function def(oForm, element_name, def_txt) { oForm.elements[element_name].value = def_txt; }

    Read the article

  • java - useBean in jsp and getAttribute in jsp but NULL

    - by ravi parekh
    user is null in servlet. Pls let me if doing mistake. i m trying to get all html element in bean rateCode.jsp **<%@page import="com.hermes.data.RateCode_" %>** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Rate Code</title> </head> <body> **<jsp:useBean id="user" class="com.hermes.data.RateCode_" scope="session" > <jsp:setProperty name="user" property="*"/></jsp:useBean>** <form id="f_rateCode" action="/ratePromoCodes" method="post" > <table align="center" border="1" cellspacing="0"> <tr> <td colspan="2" align="center" class="header">Rate Code Administrations</td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Code:</td> <td align="left" style="border-style: solid;"> <input type="text" id="code" name="code" value="${user.code}" size="10" maxlength="32" style="width: 100px"/> </td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Description:</td> <td align="left" style="border-style: solid;"> <input type="text" id="description" name="description" value="<%=user.getDescription()%>" maxlength="128" size="40"></td> </tr> <tr><td><input type="submit" value="ok" /></td> </tr> </table> </form> Servlet - ratePromoCodes protected void doPost(HttpServletRequest req, HttpServletResponse resp) { RateCode rc = (RateCode) req.getAttribute("user"); Enumeration an = req.getAttributeNames(); Enumeration pn = req.getParameterNames(); Object o = null; while (an.hasMoreElements()) { o = an.nextElement(); System.out.println(o); } while (pn.hasMoreElements()) { o = pn.nextElement(); System.out.println(o); } } RateCode.java (javaBean) public class RateCode_ { private String code ; private String description; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }

    Read the article

  • Where am I going wrong in my Xml Schema?

    - by chobo2
    Hi I am trying to make a XML Schema but everytime I use it and try to validate my data I get an error. I get this error: Validation of the XML Document failed! Error message(s): Could not find schema information for the element 'Email'. Line: 1 Column:1213 http://www.xmlforasp.net/SchemaValidator.aspx My Xml file I am trying to validate. <?xml version="1.0" encoding="utf-8" ?> <School> <SchoolPrefix>BCIT</SchoolPrefix> <TeacherAccounts> <Account> <StudentNumber>A00140000</StudentNumber> <Password>123456</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A00000041</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A0400100</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> </TeacherAccounts> <FullTimeAccounts> <Account> <StudentNumber>A00000000</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A00141000</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> </FullTimeAccounts> <PartTimeAccounts> <Account> <StudentNumber>A81020409</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A040014000</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A00024040</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> <Account> <StudentNumber>A00004101</StudentNumber> <Password>1234567</Password> <Email>[email protected]</Email> </Account> </PartTimeAccounts> </School> XMl Schema <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nothing.com" xmlns="http://www.nothing.com" elementFormDefault="qualified"> <xs:element name="School"> <xs:complexType> <xs:sequence> <xs:element name="SchoolPrefix" minOccurs="1" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="2" /> <xs:maxLength value="8" /> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="TeacherAccounts" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="Account" type="UserInfo" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="FullTimeAccounts"> <xs:complexType> <xs:sequence> <xs:element name="Account" type="UserInfo" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="PartTimeAccounts"> <xs:complexType> <xs:sequence> <xs:element name="Account" type="UserInfo" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="UserInfo"> <xs:sequence> <xs:element name="StudentNumber"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="50"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="Password"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="6"/> <xs:maxLength value="50"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="Email"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:schema>

    Read the article

  • handling NSStream events when using EASession in MonoTouch

    - by scotru
    Does anyone have an example of how to handle read and write NSStream events in Monotouch when working with accessories via EASession? It looks like there isn't a strongly typed delegate for this and I'm having trouble figuring out what selectors I need to handle on the delegates of my InputStream and OutputStream and what I actually need to do with each selector in order to properly fill and empty the buffers belonging to the EASession object. Basically, I'm trying to port Apple's EADemo app to Monotouch right now. Here's the Objective-C source that I think is relevant to this problem: / / asynchronous NSStream handleEvent method - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode { switch (eventCode) { case NSStreamEventNone: break; case NSStreamEventOpenCompleted: break; case NSStreamEventHasBytesAvailable: [self _readData]; break; case NSStreamEventHasSpaceAvailable: [self _writeData]; break; case NSStreamEventErrorOccurred: break; case NSStreamEventEndEncountered: break; default: break; } } / low level write method - write data to the accessory while there is space available and data to write - (void)_writeData { while (([[_session outputStream] hasSpaceAvailable]) && ([_writeData length] > 0)) { NSInteger bytesWritten = [[_session outputStream] write:[_writeData bytes] maxLength:[_writeData length]]; if (bytesWritten == -1) { NSLog(@"write error"); break; } else if (bytesWritten > 0) { [_writeData replaceBytesInRange:NSMakeRange(0, bytesWritten) withBytes:NULL length:0]; } } } // low level read method - read data while there is data and space available in the input buffer - (void)_readData { #define EAD_INPUT_BUFFER_SIZE 128 uint8_t buf[EAD_INPUT_BUFFER_SIZE]; while ([[_session inputStream] hasBytesAvailable]) { NSInteger bytesRead = [[_session inputStream] read:buf maxLength:EAD_INPUT_BUFFER_SIZE]; if (_readData == nil) { _readData = [[NSMutableData alloc] init]; } [_readData appendBytes:(void *)buf length:bytesRead]; //NSLog(@"read %d bytes from input stream", bytesRead); } [[NSNotificationCenter defaultCenter] postNotificationName:EADSessionDataReceivedNotification object:self userInfo:nil]; } I'd also appreciate any architectural recommendations on how to best implement this in monotouch. For example, in the Objective C implementation these functions are not contained in any class--but in Monotouch would it make sense to make them members of my

    Read the article

  • Wrapping content in td

    - by Hulk
    This following code is used to wrap up the contents within the textarea <td> <textarea rows = "8" cols = "18" border ="1" class="input" style="border: none;overflow:visible;width:100%;" maxlength="5">'+col_det[data]+'</textarea> </td> How to implement the same for a tag i.e, the conetnt within td tag should be wrapped <td>%s</td>,(sum variable) Thanks..

    Read the article

  • JSF trimming white spaces

    - by msharma
    HI, I have an input field in which I want to trim any leading/trailing whitespaces. We are using JSF and binding the input field to a backing bean in the jsp using: <h:inputText id="inputSN" value="#{regBean.inputSN}" maxlength="10"/> My question is that besides validation can this be done in the jsp? I know we can also do this using the trim() java function in the Handler, but just wondering if there is a more elegant way to achieve this in JSF. Thanks.

    Read the article

  • What is proper RegEx expession for SWIFT codes?

    - by abatishchev
    I have to filter user input to on my web ASP.NET page: <asp:TextBox runat="server" ID="recipientBankIDTextBox" MaxLength="11" /> <asp:RegularExpressionValidator runat="server" ValidationExpression="?" ControlToValidate="recipientBankIDTextBox" ErrorMessage="*" /> As far is I know SWIFT code must contain 5 or 6 letters and other symbols up to total length 11 are alphanumeric. How to implement such rule properly? TIO

    Read the article

  • yii documentation

    - by nucleartux
    where find topic with description of setters and getters of form fields? example: field: <?php echo $form->textField($model,'tagsArray',array('size'=>60,'maxlength'=>255)); ?> getter: function getTagsArray()

    Read the article

  • What is proper RegEx expression for SWIFT codes?

    - by abatishchev
    I have to filter user input to on my web ASP.NET page: <asp:TextBox runat="server" ID="recipientBankIDTextBox" MaxLength="11" /> <asp:RegularExpressionValidator runat="server" ValidationExpression="?" ControlToValidate="recipientBankIDTextBox" ErrorMessage="*" /> As far is I know SWIFT code must contain 5 or 6 letters and other symbols up to total length 11 are alphanumeric. How to implement such rule properly? TIO

    Read the article

  • What information should I log if I detect that my site is under attack?

    - by Abe Miessler
    In the code below if I get into the if statement I can safely say my site is under attack. What information is it a good idea to log? Any recommendations on actions that can be taken to minimize the damage at this point? protected void btn_Search_Click(object sender, EventArgs e) { if(tb_SearchBox.Text.Length > tb_SearchBox.MaxLength) { //What should i log? //What actions should I take? } //Otherwise search }

    Read the article

  • Having to hit the site login button twice after first turning on computer

    - by John
    Hello, The code below is for a login that I'm using. It works fine, but when I first try logging in after turning on my computer, it only works the second time that I hit the "Login" button. Any idea how I can make it not require hitting the "Login" button twice in this situation? Thanks in advance, John function isLoggedIn() { if (session_is_registered('loginid') && session_is_registered('username')) { return true; // the user is loged in } else { return false; // not logged in } return false; } if (!isLoggedIn()) { if (isset($_POST['cmdlogin'])) { if (checkLogin($_POST['username'], $_POST['password'])) { show_userbox(); } else { echo "Incorrect Login information !"; show_loginform(); } } else { show_loginform(); } } else { show_userbox(); } function show_loginform($disabled = false) { echo '<form name="login-form" id="login-form" method="post" action="./index.php"> <div class="usernameformtext"><label title="Username">Username: </label></div> <div class="usernameformfield"><input tabindex="1" accesskey="u" name="username" type="text" maxlength="30" id="username" /></div> <div class="passwordformtext"><label title="Password">Password: </label></div> <div class="passwordformfield"><input tabindex="2" accesskey="p" name="password" type="password" maxlength="15" id="password" /></div> <div class="registertext"><a href="http://www...com/sandbox/register.php" title="Register">Register</a></div> <div class="lostpasswordtext"><a href="http://www...com/sandbox/lostpassword.php" title="Lost Password">Lost password?</a></div> <p class="loginbutton"><input tabindex="3" accesskey="l" type="submit" name="cmdlogin" value="Login" '; if ($disabled == true) { echo 'disabled="disabled"'; } echo ' /></p></form>'; } EDIT: Here is another function that is used. function isLoggedIn() { if (session_is_registered('loginid') && session_is_registered('username')) { return true; // the user is loged in } else { return false; // not logged in } return false; }

    Read the article

  • Exception when indexing text documents with Lucene, using SnowballAnalyzer for cleaning up

    - by Julia
    Hello!!! I am indexing the documents with Lucene and am trying to apply the SnowballAnalyzer for punctuation and stopword removal from text .. I keep getting the following error :( IllegalAccessError: tried to access method org.apache.lucene.analysis.Tokenizer.(Ljava/io/Reader;)V from class org.apache.lucene.analysis.snowball.SnowballAnalyzer Here is the code, I would very much appreciate help!!!! I am new with this.. public class Indexer { private Indexer(){}; private String[] stopWords = {....}; private String indexName; private IndexWriter iWriter; private static String FILES_TO_INDEX = "/Users/ssi/forindexing"; public static void main(String[] args) throws Exception { Indexer m = new Indexer(); m.index("./newindex"); } public void index(String indexName) throws Exception { this.indexName = indexName; final File docDir = new File(FILES_TO_INDEX); if(!docDir.exists() || !docDir.canRead()){ System.err.println("Something wrong... " + docDir.getPath()); System.exit(1); } Date start = new Date(); PerFieldAnalyzerWrapper analyzers = new PerFieldAnalyzerWrapper(new SimpleAnalyzer()); analyzers.addAnalyzer("text", new SnowballAnalyzer("English", stopWords)); Directory directory = FSDirectory.open(new File(this.indexName)); IndexWriter.MaxFieldLength maxLength = IndexWriter.MaxFieldLength.UNLIMITED; iWriter = new IndexWriter(directory, analyzers, true, maxLength); System.out.println("Indexing to dir..........." + indexName); if(docDir.isDirectory()){ File[] files = docDir.listFiles(); if(files != null){ for (int i = 0; i < files.length; i++) { try { indexDocument(files[i]); }catch (FileNotFoundException fnfe){ fnfe.printStackTrace(); } } } } System.out.println("Optimizing...... "); iWriter.optimize(); iWriter.close(); Date end = new Date(); System.out.println("Time to index was" + (end.getTime()-start.getTime()) + "miliseconds"); } private void indexDocument(File someDoc) throws IOException { Document doc = new Document(); Field name = new Field("name", someDoc.getName(), Field.Store.YES, Field.Index.ANALYZED); Field text = new Field("text", new FileReader(someDoc), Field.TermVector.WITH_POSITIONS_OFFSETS); doc.add(name); doc.add(text); iWriter.addDocument(doc); } }

    Read the article

  • creating a JQuery function

    - by Russell Parrott
    Sorry to bother you guys & girls again on Christmas eve, but I need help creating a reusable JQuery function. I have "badly crafted" this set of code that all works. But I would really like to put it as a function so I don't have to keep repeating everything for each form. I am not too sure about how all the if statements can be combined etc. that is why I wrote it as it is. Any help much appreciated - Oh I suppose it could also be some kind of plugin but that might be the next step if I can understand how the function works. $(':input:visible').live('blur',function(){ if($(this).attr('required')) { if($(this).val() == '' ) { $(this).css({'background-color':'#FFEEEE' }); $(this).parent('form').children('input[type=submit]').hide(); $(this).next('.errormsg').html('OOPs ... '+$(this).prev('label').html()+' is required'); $(this).focus(); $(this).attr('placeholder').hide(); } else { $(this).css({'background-color':'#FFF' , 'border-color':'#999999'}); $(this).next('.errormsg').empty(); $(this).parent('form').children('input[type=submit]').show(); } } return false; }); $(':input[max]').live('blur',function(){ if($(this).attr('max') < parseInt($(this).val()) ){ $(this).next('.errormsg').html( 'OOPs ... the maximum value is '+$(this).attr('max') ); $(this).parent('form').children('input[type=submit]').hide(); $(this).focus(); } else {} return false; }); $(':input[min]').live('blur',function(){ if($(this).attr('min') > parseInt($(this).val()) ){ $(this).next('.errormsg').html( 'OOPs ... the minimum value is '+$(this).attr('min') ); $(this).parent('form').children('input[type=submit]').hide(); $(this).focus(); } else {} return false; }); $(':input[maxlength]').live('keyup',function(){ if($(this).val()==''){ } else { $(this).next('.errormsg').html( $(this).attr('maxlength')- $(this).val().length +' chars remaining'); } return false; }); As said, help much appreciated with one small (I hope) thing, how can I break out of any function IF there are no error messages to actually submit the form?

    Read the article

  • Using GET Method to Maintain Variables After Logging In

    - by John
    Hello, I am using a login system. When I navigate to comments/index.php without logging in, some variables get passed along using the GET method just fine. Then, if I log in while I am on this page, these variables disappear. The variables that disappear are $submission, $submissionid, and $url. I thought I could use the GET method to keep them live after logging in by appending ?submission='.$submission.'&submissionid='.$submissionid.'&url='.$url.' to the URL of the login form action as seen below. But the variables still disappeared after I made this addition. The relevant code I am trying to use is below. Any idea what I can do to make it do what I want? Thanks in advance, John In comments/index.php: require_once "header.php"; include "login.php"; include "comments.php"; In login.php: if (!isLoggedIn()) { if (isset($_POST['cmdlogin'])) { if (checkLogin($_POST['username'], $_POST['password'])) { show_userbox(); } else { echo "Incorrect Login information !"; show_loginform(); } } else { show_loginform(); } } else { show_userbox(); } In comments.php: $url = mysql_real_escape_string($_GET['url']); echo '<div class="subcommenttitle"><a href="http://www.'.$url.'">'.$submission.'</a></div>'; $submission = mysql_real_escape_string($_GET['submission']); $submissionid = mysql_real_escape_string($_GET['submissionid']); The login function: function show_loginform($disabled = false) { echo '<form name="login-form" id="login-form" method="post" action="./index.php?submission='.$submission.'&submissionid='.$submissionid.'&url='.$url.'"> <div class="usernameformtext"><label title="Username">Username: </label></div> <div class="usernameformfield"><input tabindex="1" accesskey="u" name="username" type="text" maxlength="30" id="username" /></div> <div class="passwordformtext"><label title="Password">Password: </label></div> <div class="passwordformfield"><input tabindex="2" accesskey="p" name="password" type="password" maxlength="15" id="password" /></div> <div class="registertext"><a href="http://www...com/sandbox/register.php" title="Register">Register</a></div> <div class="lostpasswordtext"><a href="http://www...com/sandbox/lostpassword.php" title="Lost Password">Lost password?</a></div> <p class="loginbutton"><input tabindex="3" accesskey="l" type="submit" name="cmdlogin" value="Login" '; if ($disabled == true) { echo 'disabled="disabled"'; } echo ' /></p></form>'; }

    Read the article

  • xhtml label value unchangable

    - by Tyzak
    hello, i want to output some text in an label <input type="text" size="20" maxlength="20" name="pizza1" value="Margherita"> is there a parameter that the text (value=Margherita) can't be changed, so the text is just displayed. is input type= "text" the best way to output text? (later on the text is dynamic created) thanks

    Read the article

  • How to load the rest of the data in mysql in php

    - by user225269
    I have trouble figuring out how do I load the rest of the data in html. Here is my code: <?php $con = mysql_connect("localhost","root","nitoryolai123$%^"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$_GET['id']'"); ?> <?php while ( $row = mysql_fetch_array($result) ) { ?> <table class="a" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#D3D3D3"> <tr> <form name="formcheck" method="post" action="updateact.php" onsubmit="return formCheck(this);"> <td> <table border="0" cellpadding="3" cellspacing="1" bgcolor=""> <tr> <td colspan="16" height="25" style="background:#5C915C; color:white; border:white 1px solid; text-align: left"><strong><font size="2">Update Students</td> <tr> <td width="30" height="35"><font size="2">*I D Number:</td> <td width="30"><input name="idnum" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $_GET['id']; ?>"></td> </tr> <tr> <td width="30" height="35"><font size="2">*Year:</td> <td width="30"><input name="yr" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $row["YEAR"]; ?>"></td> this is the part where I am getting the error: mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$_GET['id']'"); ? What do you recommend that I could do so that I can also load the ID Numbers corresponding data into the other forms?

    Read the article

  • Making a Login Work After Cache, Cookies, etc. Have Been Cleared

    - by John
    Hello, I am using the code below for a user login. The first I try to login after cache / cookies, etc. have been cleared, the browser refreshes and the user name is not logged in. After that, logging in works fine. Any idea how I can make it work the first time? Thanks in advance, John index.php: <?php if($_SERVER['REQUEST_METHOD'] == "POST"){header('Location: http://www...com/.../index.php?username='.$username.'&password='.$password.'');} require_once "header.php"; include "login.php"; require_once "footer.php"; ?> login.php: <?php if (!isLoggedIn()) { if (isset($_POST['cmdlogin'])) { if (checkLogin($_POST['username'], $_POST['password'])) { show_userbox(); } else { echo "Incorrect Login information !"; show_loginform(); } } else { show_loginform(); } } else { show_userbox(); } ?> show_loginform function: function show_loginform($disabled = false) { echo '<form name="login-form" id="login-form" method="post" action="./index.php?'.$_SERVER['QUERY_STRING'].'"> <div class="usernameformtext"><label title="Username">Username: </label></div> <div class="usernameformfield"><input tabindex="1" accesskey="u" name="username" type="text" maxlength="30" id="username" /></div> <div class="passwordformtext"><label title="Password">Password: </label></div> <div class="passwordformfield"><input tabindex="2" accesskey="p" name="password" type="password" maxlength="15" id="password" /></div> <div class="registertext"><a href="http://www...com/.../register.php" title="Register">Register</a></div> <div class="lostpasswordtext"><a href="http://www...com/.../lostpassword.php" title="Lost Password">Lost password?</a></div> <p class="loginbutton"><input tabindex="3" accesskey="l" type="submit" name="cmdlogin" value="Login" '; if ($disabled == true) { echo 'disabled="disabled"'; } echo ' /></p></form>'; }

    Read the article

  • Passing password value through URL

    - by Steven Wright
    OK I see a lot of people asking about passing other values, URLS, random stuff through a URL, but don't find anything about sending a password to a password field. Here is my situation: I have a ton of sites I use on a daily basis with my work and oh about 90% require logins. Obviously remembering 80 bajillion logins for each site is dumb, especially when there are more than one user name I use for each site. So to make life easier, I drew up a nifty JSP app that stores all of my logins in a DB table and creates a user interface for the specific page I want to visit. Each page has a button that sends a username, password into the id parameters of the html inputs. Problem: I can get the usernames and other info to show up just dandy, but when I try and send a password to a password field, it seems that nothing gets received by the page I'm trying to hit. Is there some ninja stuff I need to be doing here or is it just not easily possible? Basically this is what I do now: http://addresshere/support?loginname=steveoooo&loginpass=passwordhere and some of my html looks like this: <form name="userform" method="post" action="index.jsp" > <input type="hidden" name="submit_login" value="y"> <table width="100%"> <tr class="main"> <td width="100" nowrap>Username:</td> <td><input type="text" name="loginname" value="" size="30" maxlength="64"></td> </tr> <tr class="main"> <td>Password: </font></td> <td><input type="password" name="loginpass" value="" size="30" maxlength="64"></td> </tr> <tr class="main"> <td><center><input type="submit" name="submit" value="Login"></center></td> </tr> </table> </form> Any suggestions?

    Read the article

  • Django Model: many-to-many or many-to-one?

    - by knuckfubuck
    I'm just learning django and following a tutorial. I have a Link and a Bookmark. Unlike the tutorial I'm following, I would like a link to be associated with only one Bookmark, but a Bookmark can have multiple links. Is this the way to setup the model? class Link(models.Model): url = models.URLField(unique=True) bookmark = models.ForeignKey(Bookmark) class Bookmark(models.Model): title = models.CharField(maxlength=200) user = models.ForeignKey(User) links = models.ManyToManyField(Link)

    Read the article

  • Designing Business Objects to indicate constraints such as Max Length

    - by JR
    Is there a standard convention when designing business objects for providing consumers with a way to discover constraints such as a property's maximum length? It could be used up in the UI layer to, for example, set a Textbox's MaxLength property according to the maximum length limit back in the business object. Is there a standard design approach for this?

    Read the article

  • Change the Session Variable Output

    - by user567230
    Hello I am using Dreamweaver CS5 with Coldfusion 9 to build a dynamic website. I have a MS Access Database that stores login information which includes ID, FullName, FirstName, LastName, Username, Pawword, AcessLevels. My question is this: I currently have session variable to track the Username when it is entered into the login page. However I would like to use that Username to pull the User's FullName to display throughout the web pages and use for querying data. How do I change the session variable to read that when they are not entering their FullName on the login page but only Username and password. I have listed my login information code below if there is any additional information needed please let me know. This is the path for which the FullName values reside DataSource "Access" Table "Logininfo" Field "FullName" I want the FullName to be unique based on the Username submitted from the Login page. I apologize in advance for any rookie mistake I may have made I am new to this but learning fast! Ha. <cfif IsDefined("FORM.username")> <cfset MM_redirectLoginSuccess="members_page.cfm"> <cfset MM_redirectLoginFailed="sorry.cfm"> <cfquery name="MM_rsUser" datasource="Access"> SELECT FullName, Username,Password,AccessLevels FROM Logininfo WHERE Username=<cfqueryparam value="#FORM.username#" cfsqltype="cf_sql_clob" maxlength="50"> AND Password=<cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="50"> </cfquery> <cfif MM_rsUser.RecordCount NEQ 0> <cftry> <cflock scope="Session" timeout="30" type="Exclusive"> <cfset Session.MM_Username=FORM.username> <cfset Session.MM_UserAuthorization=MM_rsUser.AccessLevels[1]> </cflock> <cfif IsDefined("URL.accessdenied") AND false> <cfset MM_redirectLoginSuccess=URL.accessdenied> </cfif> <cflocation url="#MM_redirectLoginSuccess#" addtoken="no"> <cfcatch type="Lock"> <!--- code for handling timeout of cflock ---> </cfcatch> </cftry> </cfif> <cflocation url="#MM_redirectLoginFailed#" addtoken="no"> <cfelse> <cfset MM_LoginAction=CGI.SCRIPT_NAME> <cfif CGI.QUERY_STRING NEQ ""> <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)> </cfif> </cfif>

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >