Jump to content

Eivo

Members
  • Posts

    94
  • Joined

  • Last visited

About Eivo

  • Birthday 05/21/1982

Previous Fields

  • Languages
    ASP, JavaScript, VBScript, HTML, XHTML, CSS

Contact Methods

  • Website URL
    http://www.whitetowergaming.com
  • ICQ
    0
  • Yahoo
    mikeandfox

Profile Information

  • Location
    Wheeling, WV

Eivo's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. That did it. Thanks for the help, and directing me to FireBug. That really helped.
  2. I cleaned up the page a little. Here is what I wrote... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>sIFR</title> <link rel="stylesheet" href="all.css" type="text/css" media="all" /> <link rel="stylesheet" href="sIFR-screen.css" type="text/css" media="screen" /> <link rel="stylesheet" href="sIFR-print.css" type="text/css" media="print" /> <script src="sifr.js" type="text/javascript"></script> <script src="sifr-addons.js" type="text/javascript"></script> <script type="application/javascript" language="javascript"> function do_sIFR(){ sIFR.replaceElement(named({sSelector:"h1#display_area", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"})); }; function value_changer() { var a = document.getElementById("display_area"); var b = document.getElementById("new_value"); var c2 = b.value; a.innerHTML = c2; do_sIFR(); }; </script> </head> <body onload="do_sIFR()"> <div id="container"> <div> <form> <label for="new_value">Text Value</label> <input type="text" name="new_value" id="new_value" /> <input type="button" name="preview_button" id="preview_button" value="Preview" onmouseup="value_changer()" /> </form> </div> <h1 id="display_area">Hello World</h1> </div> </body></html> According to FireBug, loading the page up in FireFox gives me this... <html class="sIFR-hasFlash" lang="en" xmlns="http://www.w3.org/1999/xhtml"><head> <title>sIFR</title> <link media="all" type="text/css" href="all.css" rel="stylesheet">...CSS...</link> <link media="screen" type="text/css" href="sIFR-screen.css" rel="stylesheet">...CSS...</link> <link media="print" type="text/css" href="sIFR-print.css" rel="stylesheet">...CSS...</link> <script type="text/javascript" src="sifr.js">...JavaScript...</script> <script type="text/javascript" src="sifr-addons.js">...JavaScript...</script> <script language="javascript" type="application/javascript"> function do_sIFR(){ sIFR.replaceElement(named({sSelector:"h1#display_area", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"})); }; function value_changer() { var a = document.getElementById("display_area"); var b = document.getElementById("new_value"); var c2 = b.value; a.innerHTML = c2; do_sIFR(); }; </script> </head> <body onload="do_sIFR()"> <div id="container"> <div> <form> <label for="new_value">Text Value</label> <input id="new_value" type="text" name="new_value"/> <input id="preview_button" type="button" onmouseup="value_changer()" value="Preview" name="preview_button"/> </form> </div> <h1 id="display_area" class="sIFR-replaced"> <embed class="sIFR-flash" height="65" width="700" src="vandenkeere.swf" quality="best" flashvars="txt=Hello World&textalign=center&offsetTop=6&textcolor=#000000&hovercolor=#CCCCCC&linkcolor=#000000&w=700&h=65" wmode="" bgcolor="#FFFFFF" sifr="true" type="application/x-shockwave-flash" style="width: 700px; height: 65px;"/> <span class="sIFR-alternate">Hello World</span> </h1> </div> </body></html> So the <h1> tag is still present. After I execute the value_changer() function, I get this... <html class="sIFR-hasFlash" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>sIFR</title> <link media="all" type="text/css" href="all.css" rel="stylesheet">...CSS...</link> <link media="screen" type="text/css" href="sIFR-screen.css" rel="stylesheet">...CSS...</link> <link media="print" type="text/css" href="sIFR-print.css" rel="stylesheet">...CSS...</link> <script type="text/javascript" src="sifr.js">...JavaScript...</script> <script type="text/javascript" src="sifr-addons.js">...JavaScript...</script> <script language="javascript" type="application/javascript"> function do_sIFR(){ sIFR.replaceElement(named({sSelector:"h1#display_area", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"})); }; function value_changer() { var a = document.getElementById("display_area"); var b = document.getElementById("new_value"); var c2 = b.value; a.innerHTML = c2; do_sIFR(); }; </script> </head> <body onload="do_sIFR()"> <div id="container"> <div> <form> <label for="new_value">Text Value</label> <input id="new_value" type="text" name="new_value"/> <input id="preview_button" type="button" onmouseup="value_changer()" value="Preview" name="preview_button"/> </form> </div> <h1 id="display_area" class="sIFR-replaced">Test</h1> </div> </body></html> So in the <h1> tag, it replaces all the HTML is the input with what I give it. But it doesn't look like it is calling the do_sIFR(); function at all.In the end, the sIFR loads when the pages loads in the browser, but when I enter text and call the value_changer(); , the sIFR is replaced by regular text.I noticed that the sIFR added a class to the <h1>. Would that mess with the JavaScript finding it by the id?
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>sIFR</title> <link rel="stylesheet" href="all.css" type="text/css" media="all" /> <link rel="stylesheet" href="sIFR-screen.css" type="text/css" media="screen" /> <link rel="stylesheet" href="sIFR-print.css" type="text/css" media="print" /> <script src="sifr.js" type="text/javascript"></script> <script src="sifr-addons.js" type="text/javascript"></script> <script type="application/javascript" language="javascript"> function do_sIFR(){ sIFR.replaceElement(named({sSelector:"h1#text_number_1", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"})); }; function value_changer() { var f = document.getElementById("text_number_1"); var g = document.getElementById("tn1_value"); var g2 = g.value; f.innerHTML = g2; do_sIFR(); } </script> </head> <body onload="do_sIFR()"> <div id="container"> <div> <form> <label for="tn1_value">Text Value</label> <input type="text" name="tn1_value" id="tn1_value" onkeyup="value_changer()" /> </form> </div> <h1 id="text_number_1">Hello World</h1> </div> </body></html> This is the code I tried, but isn't working as anticipated (though I thought it should have ). Any tips on this? Thanks.
  4. I creating a website in which I need method of letting the user preview their text input in nonstandard fonts.I found sIFR and it looks like it could be a good option. But I need to be able to update the text inside the flash file. I have tried a few ways of doing this but nothing seems to work that I can find. Has anyone done this, or know a way to do this?Thanks.
  5. Now I swore that when I tried that in JScript, it didn't work. I got it working though, Thanks.
  6. I was recently hit with a malicious bot that wiped a lot of data from my database. I learned the importance of log files and db backups real fast. After a week of complete chaos and angry customers, I have everything back up and backed up. So now I have located how the attack happened and what I need to do in order to fix it, which leads me to my question.How should I handle an error in VBscript/ASP when a MsSQL reaches EOF without finding its query?When I used JScript/ASP, I used the "Try...Catch" statement. Is there anything like that with VBScript?Thanks for any help in advance.
  7. Eivo

    XQuery and ASP

    I am attempting to learn and understand the whole XML "complex". So far I am doing fine. But I want to use XML along with my ASP. I have Googled like crazy trying to find anything that covers how to use the 2 together, but I can seem to turn anything up. Does anyone have any information on how to use, specifically, XQuery and ASP together. I found out by way of error that either you can't use XQuery in ASP or that I am doing it wrong. Any help would be great appreciated, thanks.
  8. I am trying to validate my layout as I go along, but I just don't know what is meant by this error. Could you point out what I am doing wrong? Thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="main.css" rel="stylesheet" type="text/css" /> <title>Uncømmøn Strength • Layout</title> </head> <body> <div id="container"> <!-- HEADER --> <div id="header"><span style="font-size:24px; font-weight:bolder;">Uncømmøn Strength</span></div> <!-- CENTER --> <div id="wrapper"> <div id="content"> <span style="font-weight:bold">Center</span><br /> <span>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque tempus magna non velit. Vivamus porttitor lacus vitae massa. Morbi eros lorem, aliquam sed, ullamcorper non, tincidunt eget, augue.</span> </div> </div> <!-- RIGHT COLUMN --> <div id="right_col"> <div class="rcbox"></div> <div class="rcrec"></div> <div class="rcbox"></div> </div> <!-- LEFT COLUMN --> <div id="left_col"> <a href="#">Forum (Coming Soon)</a> <a href="#">Featured Article</a> <a href="#">Series One</a> <a href="#">Series Two</a> <a href="#">Author Bios</a> <a href="#">Archives</a> <a href="#">Resources</a> <a href="#">Mission</a> <a href="#">Contact US</a> <div class="rcrec"> <form action="mailer.php" method="post"> <input type="text" name="name" value="Name" /> <input type="text" name="email" value="E-mail" /> <input type="radio" name="radio" id="radio" value="radio" /> <input type="radio" name="radio2" id="radio2" value="radio2" /> <input type="submit" name="button" id="button" value="Submit" /> </form> </div> <div class="rcbox"></div> </div> <!-- FOOTER --> <div id="footer"> <span><a href="#">Forum (Coming Soon)</a> • <a href="#">Featured Article</a> • <a href="#">Series One</a> • <a href="#">Series Two</a> • <a href="#">Author Bios</a> • <a href="#">Archives</a> • <a href="#">Resources</a> • <a href="#">Mission</a> • <a href="#">Contact US</a></span> </div> </div> </body></html>
  9. Well the User ID number will only be unique to the account number, which is another field.Something like this...Account # ----- User ID54265847 ----- 458454265847 ----- 215454884125 ----- 4584I hope that helps and doesn't look like crap. So from the *cough* table above, the User ID (which is the number I'm concerned with) can be repeated, but can not be repeated under an Account Number.Could a auto_incrementing / autonumber ID field have this rule built into it?
  10. Ok, then that leads me to more of a technical question. I never had to code anything like this before. Currently I connect to my DB like this... Dim connection_object, sql_command, recordsetSet connection_object = Server.CreateObject("ADODB.Connection")Set recordset = Server.CreateObject("ADODB.Recordset")connection_object.Open "Provider=sqloledb; Data Source=******; Initial Catalog=******; User Id=******; Password=******;"sql_command = "SELECT * FROM client WHERE username LIKE '" & form_name & "' AND password LIKE '" & form_pass & "'"recordset.Open sql_command, connection_object' --- Some Code ---connection_object.CloseSet connection_object = Nothing If I wanted to check for a existing number what would be the best way to check the database? Maybe like this... Dim connection_object, sql_command, recordsetSet connection_object = Server.CreateObject("ADODB.Connection")Set recordset = Server.CreateObject("ADODB.Recordset")connection_object.Open "Provider=sqloledb; Data Source=******; Initial Catalog=******; User Id=******; Password=******;"Dim match_uid, min, max, random_numbermatch_uid = 0max=9999min=1000Do While match_uid = 0random_number = Int((max-min+1)*Rnd+min)sql_command = "SELECT * FROM client WHERE user_id LIKE '" & nf_userid & "'"recordset.Open sql_command, connection_objectIf recordset.EOF Then match_uid = 0Else match_uid = 1End IfLoop Would that work? Is there a better / easier way? Thanks!
  11. I'm looking for advice on an effective way to create an unused 4 digit identification number to be stored into a database.I thought randomly creating a number and checking for it in a database would may be too intensive (would it be?) and not a great way to do this.I also thought about sorting all the ID numbers, moving to the last one, adding 1 to it, then storing it. But that would skip over any ID's that have been deleted.Any advice?
  12. Well which characters would you sanitize?
  13. Thanks for the fast response!Actually, I switched over from JavaScript to VBScript becuase I use a third-party WYSIWYG Text Editor (Cute Editor) that is written in ASP/VBScript, and I want to keep everything as simple as possible. It also seems like I can find a lot more help on ASP/VBScript then I can otherwise. For example, I was looking for a way to condition my data to be stored in my DB, and I found a great article about Regular Expressions and WOW did that make it easy.But while I have your attention, I have some more database related questions for you.Can you have more then one open connection to a database?In v.1 on my CMS, I store a large field of XHTML, close to a whole page, but not quite. Is this safe, or is there a better way to do this.What characters do you restrict from your own MsSQL database? Are there others I should restrict?Do you know of any good articles or resources about database architecture or design?Thanks again!
  14. I'm working on v.2 of my CMS. The first version runs on ASP Classic w/ JavaScript and MsSQL. Version 1 was a trial by fire for me since I have never really wrote ANY server-side code before then, but it works pretty good and I'm proud of it. :)In version 2, which will run with ASP/VBScript instead of ASP/JavaScript, I am trying to code more properly. Such as keeping better documentation (lol, we'll see), cleaner and more efficient code, better and redundant security, XHTML 1.0 Strict, and faster load times. It is still early in development, so my question is...What is the fastest and most stable way to store / read information? Currently I am wondering about three different options specifically; MsSQL (which I am currently using), a MS Access DB, or XML. I will need many tables (or files for XML) no matter which option I choose. I am currently looking at about 5, at least. Also can you provide me with some pros and cons of each in your own personal experience and in general?I greatly appreciate any and all help. Thanks a lot!
×
×
  • Create New...