Jump to content

vchris

Members
  • Posts

    1,529
  • Joined

  • Last visited

Everything posted by vchris

  1. The one I had removed the normal attribute pop-up and added their own which you could arrange to look the same with more features.
  2. It can be modified with a script. I did that before for a site. Look on dynamicdrive.com I think that's where I found it.
  3. The links are working for me. Must be something wrong with your css...
  4. I get " Invalid CFML construct" because of the #i# inside the cfset...EDIT: Solved.
  5. The only thing accessible on the site I'm working on is a login page. So I have login_e.cfm and Application.cfm and then a secure folder called secure that contains the site and another Application.cfm.My problem is that when I log in with the correct info, the login page reloads and if I refresh the page or click login again without any info in the fields, I'm redirected to the secure folder and I'm logged in. For some reason I have to reclick or refresh the page myself. Same thing happens on logout. I have to reclick the logout button.I have a session variable called LoggedIn. By default it's 0 and when the user is logged in it's 1. Login_e.cfm <cfif isDefined('form.login')> <cfif len(form.uname) gt 0 AND len(form.pword) gt 0> <cfif form.uname eq 'a' AND form.pword eq 'b'> <cfset Session.LoggedIn = 1> </cfif> <h3>Loggin unsuccessful</h3> <cfelse> <h3>Username and password are required.</h3> </cfif> </cfif> Public Application.cfm <cfapplication name="PRTRSite" sessionmanagement="yes" sessiontimeout="10" clientmanagement="no"><cflock type="exclusive" scope="session" timeout="10"> <cfparam name="Session.LoggedIn" default="0"></cflock><cfif Session.LoggedIn eq 1> <cflocation url="secure/index_e.cfm"></cfif> Private Application.cfm <cfapplication name="PRTRSite" sessionmanagement="yes" sessiontimeout="10" clientmanagement="no"><cflock type="exclusive" scope="session" timeout="10"> <cfparam name="Session.LoggedIn" default="0"></cflock><cfif Session.LoggedIn eq 0> <cflocation url="../login_e.cfm"></cfif> Do I have to redirect myself? Won't Application.cfm do it automatically?
  6. vchris

    Google Maps Pop-up

    All I see is a google ad at the top of the page beside w3schools logo. It doesn't block anything for me.
  7. I cannot have 2 forms or else when the user submits the form only 1 form will be submitted (missing fields). I don't use querystrings for this page. As soon as the page reloads (any submit clicked) it will validate it so even if I have a <cfif> for the refresh button it will still validate first.
  8. This should help you understand what I mean http://livedocs.macromedia.com/coldfusion/...cs/00001385.htmThere is no onclick it's all done with CF because of the _required in the hidden field.Here's how it works. I have an input and a matching hidden input except I've added _required to the name and the value is the error displayed to the user. Upon form submission, CF will validate all fields that have a matching hidden field. The problem is when I add another submit button for another event. I cannot use javascript for that other button I've added. The point of that button is for users that do not support JS. Basically I have a drop down and with javascript enabled it makes a certain number of text field appear onchange and without javascript, you click a refresh button which reloads the page and makes the text fields appear. ...<input type="text" name="textinput" /><input type="hidden" name="textinput_required" value="textinput is required." /><input type="submit" name="submit" value="submit" />...
  9. I am working on an app that I can't change too much. The way the form validation work is with hidden input fields.Here's what I mean: <input type="Hidden" name="company_required" value="Company Name is a required field"> The problem is that this validation method validates upon any submit button being clicked. In my form I have a 2 submit buttons and I can't get rid of 1. Is there some sort of option or attribute to this sort of form validation for it to only validate when a specific submit button is pressed?
  10. I think the links are hard to read, no enough colours, almost all solid colours except for your links. Kinda easy to tell that it's been made in 30 mins.
  11. function validateForm(thisForm) { var extraValue = thisForm.extra.value; if(extraValue > 0) { for(i = 1; i <= extraValue; i++) { if(thisForm.extraEmail_i.value == '') { alert('Extra e-mail ' + i + ' is required.'); } } }} As you can see I have thisForm.extraEmail_i.value. I want to validate many text inputs I have (0-8). So basically all I want is the _i to be evaluated by JS (take the value of i in the loop). In CF you add #, how can that be done in JS?
  12. vchris

    CF Book

    I checked out the Programming Coldfusion MX By Rob Brooks-Bilson book and it seems pretty good ~1000 pages. The Ben Forta book I'm loosing about 300 pages since I know all that stuff already.Skemcin did you try that book by rob brooks-bilson?
  13. vchris

    CF Book

    The first one is huge! 1800 pages!!! Is it more advanced or does it just cover A-Z that an intermediate could understand?I think the second one best suites me. Not to big and contains what I need to know at this point.Thanks for the those links Skemcin.pulpfiction: The O'reilly are pretty good. I'll check it out.
  14. <cfif isDefined('form.submitExtraReg')> <cfif form.extra neq 0> <cfloop index="i" from="1" to="#form.extra#"> <cfif len(form.extraName_#i#) gt 0 AND len(form.extraEmail_i) gt 0 AND len(form.extraPhone_i) gt 0> Success </cfif> </cfloop> </cfif></cfif> I have a loop that creates up to 8 rows of 3 inputs depending on the choice of a drop down. I need to validate these text input. I want to validate them with a cfloop since I don't know how many there could be. Each input is named with a _# (_1, _2, _3) that indicates the row they are on. It seems I get an error with the above code. CF says the # inside the len is invalid. If I just leave it to _i, it doesn't evaluate it. Is there a way to have it evaluate i?Error
  15. vchris

    CF Book

    Anyone know of a great book for an intermediate CF programmer?
  16. Here's what I got: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <style type="text/css"> /*input.extraReg { display: none; }*/ tr.extraReg { display: none; } </style> <script language="javascript"> function toggleInputs(itemValue) { var i; removeInputs(itemValue); addInputs(itemValue); } function removeInputs(itemValue) { for(i = 1; i < 9; i++) { document.getElementById('row_' + i).style.display = 'none'; } } function addInputs(itemValue) { for(i = 1; i <= itemValue; i++){ document.getElementById('row_' + i).style.display = 'block'; } } function createInputs(itemValue) { var i; var inputName = '<td><input type="text" name="extraName_' + i + '"></td>'; var inputEmail = '<td><input type="text" name="extraEmail_' + i + '"></td>'; var inputPhone = '<td><input type="text" name="extraPhone_' + i + '"></td>'; for(i = 1; i <= itemValue; i++) { document.getElementById('my_div').innerHTML = document.getElementById('my_div').innerHTML + '<tr id="row_' + i + '">' + inputName + inputEmail + inputPhone + '</tr>'; } for(i = 1; i <= 8; i++) { document.getElementById('row_' + i).remove(); } } </script><body><form method="post" action="testingdb.cfm"> <p><strong>Extra Registration :</strong> <select name="extra" onChange="toggleInputs(this.value)"> <cfloop index="i" from="0" to="8"> <cfoutput> <option value="#i#">#i#</option> </cfoutput> </cfloop> </select> </p> <table border="1" id="my_div"> <tr> <th>Name</th> <th>Email</th> <th>Phone number</th> </tr> <cfloop index="i" from="1" to="8"> <cfoutput> <tr id="row_#i#" class="extraReg"> <td><input type="text" name="extraName_#i#" id="extraName_#i#" value="extraName_#i#"></td> <td><input type="text" name="extraEmail_#i#" id="extraEmail_#i#" value="extraEmail_#i#"></td> <td><input type="text" name="extraPhone_#i#" id="extraPhone_#i#" value="extraPhone_#i#"></td> </tr> </cfoutput> <!--- <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> ---> </cfloop> </table></form></body></html> I make the whole row appear onchange of the select but somehow the row appear all in one cell. I don't understand why. Any ideas? When I reselect another number, it removes the rows and adds the correct number again but it leaves a blank area (sort of like empty <td>). I don't know how to remove that. It seems like it ignores the <td> and </td>.I think that the <cfoutput> creates the problem that everything is in one cell. In my loop I typed in this line: <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> and it worked perfectly. Any ideas for a solution to this? I need output for naming my inputs and ids.If you want to see what I mean, just use the above code (I don't use the createInputs() function right now).I found the solution. My problem is I set the <tr> to display block instead of table-row.
  17. I have a drop down which will create a certain number of text inputs depending on the option they choose. In the drop down I have 0, 1, 2, 3, 4, 5, 6, 7 and 8. The inputs are created by groups of 3, each in their own cell, all on one row. What is the best way to create another row if the user chooses 2 and have the second row appear underneath the first?Here's a bit of code. <select name="extra" onChange="createInputs()"> <cfloop index="i" from="0" to="8"> <cfoutput> <option value="#i#"<cfif i eq extra> selected="selected"</cfif>>#i#</option> </cfoutput> </cfloop> </select> </p> <table> <tr> <th>Name</th> <th>Email</th> <th>Phone number</th> </tr> <tr> <td><input type="text" name="extraName_1" value="<cfoutput>#extraName_1#</cfoutput>"></td> <td><input type="text" name="extraEmail_1" value="<cfoutput>#extraEmail_1#</cfoutput>"></td> <td><input type="text" name="extraPhone_1" value="<cfoutput>#extraPhone_1#</cfoutput>"></td> </tr> Got that figured but will I be able to validate them with ColdFusion since in the html code I don't see the element all I see is the JS?Should I simply have the 8 inputs invisible with CSS and when a certain option is chosen I make some appear?
  18. You open Outlook, Outlook Express or whatever mail client you have, you attach your html document and send it!
  19. vchris

    Welcome

    Oh Hello! I am new here and it's my first day. Q: Why did the XHTML actress turn down an Oscar? A: Because she refused to be involved in the presentation. Q: Why was the font tag an orphan? A: Because it didn’t have a font-family. Q: Why do CSS designers have too many children? A: Because they employ lots of child selectors. Q: Why was IE5’s 3-metre wide cell in the insane asylum smaller than IE6’s 3-metre wide cell? A: Because the width of the cell included the padding… Q: Why was the XHTML bird an invalid? A: Because it wasn’t nested properly. :)
  20. I can only view the second site, firewall at work blocks the first one. Second site seems to be missing the banner... I only see a white line in top center of the page. There isn't much colours other than black, gray and white... Maybe try something else than solid colours for your left and right columns. Add a banner. It's not really clear that the first link goes to a forum.Note: Your forum is really popular 3200 users and 90000 posts.
  21. Seems like when I do if(invisibleDocType.options.text.search('ISIC4') != -1){ it works but when I replace it with the variable it doesn't. Ok got it working now it display the right options in my select.I got this code: for(i=0;i<invisibleDocType.options.length;i++) { docType.options[i] = null; if(invisibleDocType.options[i].text != 'Make a Selection') { splitOptionText = invisibleDocType.options[i].text.split(" --- "); if(splitOptionText[0].search(optionFilter) != -1) { docType.options[i] = new Option(splitOptionText[1], invisibleDocType.options[i].value); } } else { docType.options[i] = new Option(invisibleDocType.options[i].text, invisibleDocType.options[i].value); } } I got all the options I want but I have a bunch of empty options (should be the options that don't meet the if statement). How can I remove those blank options?Resolved!!!
  22. Doesn't seem like this guy's technique worked because I've tested his site before any mods were made and I got the same error...
  23. vchris

    Polls

    I have but the code is huge. I mean you have many pages included in a web poll application. You'll need a server side scripting language (asp, php, cf...). Look on google you might find something.
×
×
  • Create New...