Jump to content

Skemcin

Members
  • Posts

    2,684
  • Joined

  • Last visited

Everything posted by Skemcin

  1. Skemcin

    CFIF

    Here is how I would handle the concerns you address:a.) I always do client side form validationb.) I back up my client side validation with server side validationc.) It doesn't matter if you use page A or page B to process a form, any one can place a page on their local drive and submit to your page. All my action pages check for both a certain submit button value and for the page(domain) referrer url. This ensures that only a certain page(s) in my domain are posting to my applications.ie: http://www.iribbit.net/i/contactme-action.cfmAs for returning errors - I either use alerts on the action page or I use server side includes on the action page for error catching. I, then, either have the link that returns the user to the form look like a link or have it as an actually form button posting back to the original form page. That page, just like the action page, use the same set of <cfparam name="form.myvariable default="myvalue"> tags. It simply doesn't matter what page does the processing, the form page still has to have all the code written into it to be prepopulated.Another reason I seperate my actions from my forms is to make server log analysis much easier. I can isolate errors or slow request much easier. I don't have to think - "oh does this page have a form on it is it a post or get, how do I know if this page is showing an error for some other reason".In any respect, I mentioned that each developer has his/her own conventions. ColdFusion logic, I feel, is very easy to separate form from function and display from action. I, honestly, am not versed in asp or php enough to formulate a real evidenced based comparison. It probably still wouldn't matter since a developer is still going to do what they want.:)I can only advise you to try each way that might be presented to you and give each a fair shake. Then, adapt or modify it to suit your needs.I've got more rationale if you have more questions.:)BTW, the example I provided doesn't have the referring URL check in it - I don't think, - I'd have to check.
  2. Skemcin

    CFIF

    Funny you should ask. First, understand that I do not believe that there is any correct or incorrect naming convention out there. From my experience, I've found each developer ends up finding/creating their own. I've just always questioned how much consideration is given to any other developer. Of course, the first answer is, why should you care. Well, if you are a stand up, honest person, then you should be able to understand that you may not always be the one responsible for the code. And not caring about making the next developer is taking the low road - one I prefer to travel less. I'd rather have a favorable impression of the previous developer and have more respect for the work they did then find myself cursing them every chance I get for the mess they left.Anyhow, here is a link to a PDF file I can offer you (and anyone else interested). It is bits and pieces of stuff I've defined (for myself and any contractors I hire) over the last couple of years.Here ya go:http://www.iribbit.net/i/_files/conventions.pdf
  3. Skemcin

    CF login

    yep - I feel the same way with pages I re-engineer. I think seeing a tag based scripting language amongst other tags is easy to read and easy to organize. Especially since you very rarely ever have a situation where you have to write CF code inside an HTML tag or visa-versa - quite the opposite when it comes to php and asp.
  4. Skemcin

    CFIF

    Here is how I handle the situation you are speaking of.First, we have to talk conventions - I separate my action pages from my form pages:login-form.cfmlogin-authenticate.cfm(for instance)I've know developers that pup all this stuff on one page - I can't handle all the clutter - the 300 lines of code - so I separate mine.This is important since it dictates the method used to pre-populate a form on a post back. If you have all the action taking place on the same page, then I'd do this:a.) <cfparam> all form variable firstb.) write a single condition at the top of the page <cfif ISDEFINED("form.btn_submit")> where the name of the submit button is "btn_submit" and that form variable is not <cfparam>'ed. This will isoloate the code in the if statement to only run when the submit button is usedc.) write your form and have all the value attributes defined with #form.variable#. Now, for radio buttons, check boxes, and drop down values, the "selected='selected'" or the "checked='checked'" attributes WILL need to be wrapped in conditional statements like this: <input type="checkbox" name="xxxxxx" value="1"<cfif form.xxxxxx EQ 1> checked="checked"</cfif> /><input type="checkbox" name="xxxxxx" value="2"<cfif form.xxxxxx EQ 2> checked="checked"</cfif> /><input type="checkbox" name="xxxxxx" value="3"<cfif form.xxxxxx EQ 3> checked="checked"</cfif> /> If your <cfparam name="form.xxxxxx" defualt="0"> is defined at the top of the page then none will be checked. Once the form is posted back the way this is coded, then it will pre-populate the value.Try this and let me know how it works out.
  5. Skemcin

    Image Preview

    how many hours do you think you would need to build it?
  6. I'm a loyal EnemyTerritory gamer since it replaced Return to Castle Wolfenstein. ET is free - and I like that.If you wanna download and play, let me know I've got a handout as well.: Screen name = AlsoKnownAs, but you can call me aka for short.
  7. Skemcin

    Image Preview

    Thanks for the articles - they do address what I need to do - functionally.I'm not working in a .NET environment unfortunately. The reason I was hoping to come across a java applet is because I am working on a site for a photo printing lab and each image in the online gallery needs to be diplayed as color, b&w, and sepia - I need to avoid saving an image of each tone - that immediately triples the hard drive space used.I'll try some more googling I guess . . . great articles though - thanks.
  8. Skemcin

    CFIF

    First, if you are only asking for a username and password and the query returns no results, then you would not be have a first and last name to return to them. It is not advised to ask for a username and password and upon failure identify who just tried to log in. Meaning, you should never offer any personal information until they are successfully logged in. I could find out your first and lastname just by knowing your user id - not a good thing.In place of <cfif>, you can use <cfcase> and <cfswitch>. Its a little more complicated but not too much.What is leading you to ask about the single line <cfif> question - curiosity or some functionality you are trying to incorporate?
  9. do a search in the forums for "email form" and you will find plenty of information. you will need to choose a server side scripting language (asp, php, coldfusion) unless you use the "mailto:" function.
  10. I'm not sure if the obvious is so obvious but I'll point it out since it hasn;t been mentioned. The word "of" is ignored by search engines, just as "the" and "and" and other prepositions or conjunctions like that unless they are used by themselves or in quotation marks.The significants in this is to point out that you are in direct keyword competition with "Symphony of Rats" or "The Symphony Rats" or any similar keyword combination.I know that part is obvious but I point that out after making my first statement to bring your focus to the words "symphony" and "rats" alone. One advantage you have is that your words are contiguous and not interrupted by the word "of" - this will help you in your search engine placement.So, solutions . . . my first recommendation is sort of a cheesy way (haha get the pun) to advance your rankings. On your homepage, get more text that uses your keywords (don't over use them). But also, experiment with a statement like:"... its almost like a symphony of rats at my house..." use the keywords that you are competing with in your text to piggy back their success.Second, referral links are nice if they come from legitimate sources - link exchanges often hurt your ranking just as the over use of keywords does.Use, at least, <h1>(one per page) and <h2>(as many as you like) tags in your site to identify content blocks - search engines like them. Try to work your key words into the heading tags you use. Your homepage is a perfect example - you have this: <center><font size="4" face="Verdana"><b>Symphony Rats</b></font></center> when you could have this: <h1>Symphony Rats</h1> Less code, same effect (especially if a style is assigned) and search engines love it.Your <title> tag should have more information in it too. Plus, PLEASE, never say your site is under construction - every website is ALWAYS under construction or there would be no reason to come back. That phrase just screams out - "I'm impatient and threw this up for the time being, I'' get to other parts eventually..." If you are not ready to launch a page, section, or bit on text, then don't launch it and don't launch the space for it - thinking in advance and implementing it will look better. Think about it like this...would you like to get an invitation in the mail to get free dinner at Joe's Diner only to show up and see that its "under construction"? Whatever is supposed to fill in the "under construction" area can always be introduced later as a "new section" or "new area" of a website - showing your growth.Anyway, I hope this helps out some. The most important thing is to get relevant referrals - search engines are like word of mouth advertising - the more your site is discussed and mentioned, the more it will be relevent to a search engine.
  11. thanks for stopping by - we appreciate your patronage.
  12. Skemcin

    Image Preview

    Has anyone successfully found/used a Java applet that will load an image then change it from color to black/white to sepia tone?If so, can you point me where I can get it and any pointers that you might offer as a result of your experience?Thanks in advance.
  13. Skemcin

    CFIF

    let me know if you have any other questions . . .
  14. Skemcin

    CFIF

    Here is how I typically do it. <cfparam name="form.username" default=""><cfparam name="form.password" default=""><cfquery name="qryCheckPassword" datasource="xxxxxx" username="xxxxxx" password="xxxxxx">SELECT *FROM abc_customersWHERE abc_username LIKE 'form.username'AND abc_password LIKE 'form.password'</cfquery><cfif qryCheckPassword.recordcount EQ 0>Username and Password combination NOT FOUND, send message to client and ask to try again. Optional:<cfset session.username=form.username>if you set session variables then you can have your login in form repopulate the form with the username to save the user time - or pass it in the url.<cfabort><cfelseif qryCheckPassword.recordcount EQ 1>LOG IN SUCCESSFUL - tell client they are in and then do all you login functions here (db update, session variables, etc.<cfelse>MULTIPLE RECORDS found - might need to do something about this - report a failure to client but send yourself an email about duplicate record<cfabort></cfif> Let me know if this helps.Basically, you should have to use a coldfusion condition to check if the form password is equal to one found when looping through a query - that takes to long (in milliseconds). Just build your query to be conditional upon what was submitted.
  15. set your (field of view)fov to something like 140 degrees - I think the default is 110. It make it a little fish eyed, but with that screen you'll see more off to the side than most out of box (oob) players - then you'll have even more of an advantage.
  16. Skemcin

    Question

    well, javascript is a client side language that will not allow you to save anything that you will be able to review. then, the crudest method is to use "mailto:" but I've eluded to why that is not favorable to use in other posts.so, to answer your questions, you should use a server side scripting language like php, asp or coldfusion. This will allow you to capture the information posted in the form. Now, here are your options from that point. You can e-mail in the information to yourself, you can save it to a database, or you can safe it in a file (text or xml for instance) that stays on your server. Each language has its own way of performing these tasks, you'll have to review the tutorials on that.
  17. granted, you could use the "mailto" function of the href attribute - but I'd only recommend that as a last resort. I'd recommend finding an external application first (if one even exists).Spam bots love to pick up email addresses from href attributes using the "mailto" function. Plus, you'll have to URL encoded every special character, include spaces and HTML tags - so have fun with that. But it is possible.:)Here is a php script I quickly found by way of google:http://www.plus2net.com/php_tutorial/tell_friend.php
  18. I'll try to be of some help here, so lets see . . . First, mysql admin in dos is based on the assumption that you do not have a wbe based tool. Since you do have a web based tool, the developer of that product should have some sort of documentation to help you use it - I'm not aware of anyone who develops help tutorials for commercial products for no charge.As far as the configuration issue you have, it can be tricky. If things work on your remote server but not locally, then check your application server to be sure script execution is enabled. Aside from that, you'll need to set up dynamic path definitions. Where you set a global variable "webroot" and set it appropriately fro the server being used. As long as you scripts are prefix with that variable, then all your tasks should work fine.This is an example on how I do it in ColdFusion: <!--- establish root directory and url ---><cfif #cgi.local_addr# IS "(your global ip)"> <!--- live server ---> <cfset dirused="d:\inetpub\yourdomain"> <cfset urlused="http://www.yourdomain.net/"> <cfset session.mailserver="mail.yourdomain.net"> <cfset webroot="/"> <cfelse> <!--- dev server ---> <cfset dirused="s:\Inetpub\wwwroot\yourdomain"> <cfset urlused="http://192.168.0.103/yourdomain"> <cfset session.mailserver="mail.yourdomain.net"> <cfset webroot="/yourdomain/"></cfif>
  19. like this: <form action="##" method="post"><select name="cssdropdown"><option value="0">-- select one --</option><option value="0"></option><option value="a" style="font-weight:bold; background-color:#F0F0F0;">- Serch Engines</option><option value="a1"> · Google</option><option value="a2"> · DMOZ</option><option value="a3"> · Yahoo</option><option value="a4"> · Lycos</option><option value="a5"> · Alta Vista</option><option value="b" style="font-weight:bold; background-color:#F0F0F0;">- Web Mail</option><option value="b1"> · Gmail</option><option value="b2"> · Yahoo</option><option value="b3"> · AOL</option></select></form> in action:http://www.iribbit.net/i/_files/css_dropdown.htm
  20. you could use javascript but it is much easier using a server side scripting language like php, asp or coldfusion. Basically, you create one form page that is programmed to read a url variable. On the referring page (the page you want to send to a friend) you pass the folder/filename of the file. Then the form would read the url and rebuild the absolute path in the message that is being sent. Include additional information - advertising if you're really smart, and you're all set.
  21. Depending on your circumstances, you could always publish each fla file and then use the import function to bring them into one single fla file. Make sure you make an instance(movie type) out of each one as you bring them in.
  22. if you could hide/disguise the source of a page to a point where the client would not at all be able to see it - then the browser would not be able to render it.the ONLY possible way you could do this is to have a client side plug in that removes the page source from cache (even memory cache) so that you are only left with what you see on the screen when the page was initially downloaded. But what would be point in that be.Even though javascript is a client side language, it would not be able to erase any code since the browser cannot execute the script until the page is being loaded, which means it is being written locally, which means there is a record of it.This quest is as useful as seeking a way to prevent people from "steeling" images.You can't starve yourself if you're eating a pork chop!
  23. Skemcin

    CF login

    see how easy coldfusion is?
  24. one of the more popular methods that folks will begin to experiment with on this type of requirement might be a combination of AJAX and [insert your server side scripting language here] - coldfusion, asp, php, jsp, ruby on rails.All your state information would be in a database that your application would query based on the input (click of state or keyword search). AJAX would allow you to have a click get the information and return the results while swapping the image of any state that met the criteria.Of course, this can be done without AJAX and just any scripting language if you don't mind page load with each request (which is what everyone is used to these days anyway). All in all, I personally feel it would be easier to do in (for me) ColdFusion. But you could have a more professional presentation in flash:http://www.pedialink.org/emb/files/multime...istics_anim.swf
×
×
  • Create New...