HTML - Html Variable Trouble, Probably Simple
I have some code that was left behind, cannot get in contact with the original creator, and I know nothing about the kinds of things he was doing in this section. No documentation either.
Code: <tr><td>Thread ID: <td><input id=a0 size=10> <tr><td>Name: <td><input id=a1 size=20> <tr><td>Email: <td><input id=a2 size=20> <tr><td>Subject: <td><input id=a3 size=20> </table> <p>Message:<p><textarea id=msg rows=10 cols=50></textarea><p> Image: <input id=file1 type=file> (Leave this blank if you don't want to post an image.)<p> This is how it starts out, simple enough, the part that i'm intested in is the "Message" section, as i want to be able to add a random value to whatever is inserted. The message part enters a loop at some point of the code. Code: '"resto"\r\n\r\n'+t+s+ '"name"\r\n\r\n'+a1.value+s+ '"email"\r\n\r\n'+a2.value+s+ '"sub"\r\n\r\n'+a3.value+s+ '"com"\r\n\r\n'+msg.value+s+ '"upfile"; filename="'+fso.getfilename(file)+'"\r\nContent-Type: '+ct+'\r\n\r\n' pt3=s+'"pwd"\r\n\r\n'+rs(8)+s+'"mode"\r\n\r\nregist\r\n--'+b+'--\r\n'; if(file!="")pt3=rs(20)+pt3; wsh.currentdirectory=fso.getspecialfolder(2); var f1=fso.createtextfile("part1.tmp"); var f3=fso.createtextfile("part3.tmp"); f1.write(pt1); f3.write(pt3); f1.close(); f3.close(); if(file!="")fso.copyfile(file,"part2.tmp"); if(file=="")wsh.run("cmd /c copy /b part1.tmp+part3.tmp request.txt",0,1); else wsh.run("cmd /c copy /b part1.tmp+part2.tmp+part3.tmp request.txt",0,1); var a=new ActiveXObject("ADODB.Stream"); a.mode=3; a.type=1; a.open(); a.loadfromfile(fso.getabsolutepathname("request.txt")); x.send(a); a.close(); i think this is where something happens to the message... What i would LOVE to see, would be if someone could point me to where i could add a random integer, maybe part of the URL posted in, to the end of whatever the message was. Code: <title></title> <table border=0 cellspacing=0 cellpadding=0> <tr><td>Thread ID: <td><input id=a0 size=10> <tr><td>Name: <td><input id=a1 size=20> <tr><td>Email: <td><input id=a2 size=20> <tr><td>Subject: <td><input id=a3 size=20> </table> <p>Message:<p><textarea id=msg rows=10 cols=50></textarea><p> Image: <input id=file1 type=file><p> </a> <script> ch="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); function rs(n){ str=""; for(i=0;i<n;i++) str+=ch[Math.floor(Math.random()*ch.length)]; return str; } fso=new ActiveXObject("Scripting.FileSystemObject"); wsh=new ActiveXObject("WScript.Shell"); x=new ActiveXObject("Microsoft.XMLHTTP"); v=0; posted1=""; function post(){ if(msg.value==""){alert("no message");v=0;} else{ try{ t=a0.value; if(t==""){ x.open("get","http://url-goes-here.html?"+rs(20),0); x.setrequestheader("Referer:","http://url-goes-here.html"); x.setrequestheader("Accept-Language","en-us"); x.send(); t=x.responsetext.match(/<span id="nothread\d+/g); t=t[Math.floor(Math.random()*t.length)].match(/\d+/g)[0]; } b=rs(20); file=file1.value; ext=fso.getextensionname(file).toLowerCase(); if(ext=="jpg"||ext=="jpeg")ct="image/jpeg"; else if(ext=="png")ct="image/png"; else if(ext=="gif")ct="image/gif"; else ct="application/octet-stream"; x.open("post","http://url-goes-here.php",0); x.setrequestheader("Content-Type","multipart/form-data; boundary="+b); x.setrequestheader("Referer:","http://url-goes-here/"+t+".html"); x.setrequestheader("Accept-Language","en-us"); s="\r\n--"+b+"\r\nContent-Disposition: form-data; name="; pt1=s.substr(2,s.length-2)+'"MAX_FILE_SIZE"\r\n\r\n2097152'+s+ '"resto"\r\n\r\n'+t+s+ '"name"\r\n\r\n'+a1.value+s+ '"email"\r\n\r\n'+a2.value+s+ '"sub"\r\n\r\n'+a3.value+s+ '"com"\r\n\r\n'+msg.value+s+ '"upfile"; filename="'+fso.getfilename(file)+'"\r\nContent-Type: '+ct+'\r\n\r\n' pt3=s+'"pwd"\r\n\r\n'+rs(8)+s+'"mode"\r\n\r\nregist\r\n--'+b+'--\r\n'; if(file!="")pt3=rs(20)+pt3; wsh.currentdirectory=fso.getspecialfolder(2); var f1=fso.createtextfile("part1.tmp"); var f3=fso.createtextfile("part3.tmp"); f1.write(pt1); f3.write(pt3); f1.close(); f3.close(); if(file!="")fso.copyfile(file,"part2.tmp"); if(file=="")wsh.run("cmd /c copy /b part1.tmp+part3.tmp request.txt",0,1); else wsh.run("cmd /c copy /b part1.tmp+part2.tmp+part3.tmp request.txt",0,1); var a=new ActiveXObject("ADODB.Stream"); a.mode=3; a.type=1; a.open(); a.loadfromfile(fso.getabsolutepathname("request.txt")); x.send(a); a.close(); r=x.responsetext.match(/\d+/g); r=r[r.length-2]; if(file=="")w=31; else w=46; posted1+="Successfully posted in thread "+r+". Waiting "+w+"<br>"; posted.innerHTML=posted1; w*=1000; } catch(e){ posted1+="Failed to post for some reason. <br>"; posted.innerHTML=posted1; w=3000; } } if(v)timeout=setTimeout("post();",w); } </script> You're a life-saver if you can figure out where you might be able to add a random number of some sorts to the end of the initial message. Similar TutorialsI am having trouble getting my email signature to be single spaced. Hopefully, you guys can help me out. Here is the existing code: <p><strong>Landmark Tax Group</strong></p> <p><strong></strong>2701 Harbor Blvd., Ste. E2-303</p> <div>Costa Mesa, CA 92626</div> <p> </p> Which looks like this when viewed in Roundcube Webmail: Landmark Tax Group 2701 Harbor Blvd., Ste. E2-303 Costa Mesa, CA 92626 I need the above lines to look like this: Landmark Tax Group 2701 Harbor Blvd., Ste. E2-303 Costa Mesa, CA 92626 I appreciate your help! Thank you! Michael Hey, I really new to HTML and I'm playing around with it and I created a simple template for a website. However I cannot make a left sidebar any thinner. <div id="lside"> <td width="200" align="left" valign="top" style="width:140;margin-right:10px;border: 3px solid #996633;: 0px;"> <form method="POST" action="../../../../www.pharaohsnet.com/login/login.php"> <p>Username: <input type="text" name="username" size="15" /><br /> Password: <input type="password" name="password" size="15" /> <br /> </p> <div align="center"> <p> <input type="submit" value="Login" /></p> </div> </form> </div> <!-- StartChat Box --> <DIV id="ChatButtonChatBox"> <script type="text/javascript"> CHBT_channel="18286507"; CHBT_title="Pharaohs Net Chat"; CHBT_titlecolor="F0F8FF"; CHBT_size="200x250"; CHBT_bgcolor="F0F8FF"; CHBT_bordercolor="000000"; CHBT_textcolor="000000"; CHBT_textsize="11"; CHBT_usercolor="FFFFFF"; CHBT_nncolor="0000FF"; CHBT_cpcolor="000000"; CHBT_flashcolor="335599"; CHBT_profanityfilter="1"; //--></script> <script type="text/javascript" src="http://www.chatbutton.com/cc.js"> </script> </DIV> <!-- End Chat Box --> <p><br> To me, it looks like the sidebar has plenty of room to move, yet even when I fiddle with the width numbers, nothing changes. Anyone know how to fix this? I am currently making my first ever site online... I am haivng some difficulty with the frames... Code: <html> <head> <title>Jman1022's Official site</title> </head> <frameset rows="200,586"> <frame noresize="noresize" src="title.htm" name="title" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"> <frameset cols="220,2*" <frame noresize="noresize" src="menubar.htm" name="menu" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"> <frame noresize="noresize" src="body.htm" name="body" frameborder="0" marginwidth="0" marginheight="0"> </frameset> </frameset> </html> I do not see why there still is a white border between the frames linky If anyone could help i would greatly appreciate it Hi everybody, I'm new here and I'm taking a very basic HTML/XHTML course at a local community college. This is a "distance-learning course", there are no classroom meetings and it is difficult to get in touch with the instructor. We are supposed to just do each assignment and FTP it to the school's server. I am using TextWrangler on a MacBook and Safari as my browser. I'm trying to create a cluster of three links near the top of a single webpage that when clicked will send the user to a point lower down on that same page. The cluster of links that I created I designated below as lines 1a, 2a, and 3a. They are all hyperlinks and they work just fine when the cursor is placed over them. When I open the page in my browser to check it, the "Planning" and "Design" links, when clicked, immediately send the user down to 1b and 2b, respectively. It is the third link, 3a, that does not send the user to 3b. So there must be something wrong with either line 3a or 3b. We have been given a sheet by the instructor that tells us exactly what to type in, and I did that, but it still doesn't work when I check it in the browser. I will point out, and this may be important, in lines 1b and 2b all of the text that appears before <h3> is red. In line 3b the two digits "> are green. Everything before those two digits is red as it is in the other two lines. What am I doing wrong? Thanks, Mike 1a) <a href="#planning">Planning</a><br> 2a) <a href="#design">Design</a><br> 3a) <a href="#usability">Usability</a><br> 1b) <a name="planning"><h3>Planning</h3></a> 2b) <a name="design"><h3>Design</h3></a> 3b) <a name="usability"><h3>Website Usability</h3></a> Here's what I have for my table layout, but for some reason as soon as I put words into some of the cells it expands them horizontally, resulting in the four columns not being the same width. I don't know what is causing this, so any help would be great. Is there a way to make the column width static. <head> <title>Kainos</title> </head> <body background="images/background.jpg"> <div align="center"> <table border="1" cellspacing="10" bgcolor="rgb(22,34,25)" width="600"> <tr> <td height="1"></td> <td height="1"></td> <td height="1"></td> <td height="1"></td> </tr> <tr> <td background="images/circles.jpg"></td> <td background="images/circles.jpg"></td> <td background="images/circles.jpg"></td> <td background="images/circles.jpg"></td> </tr> <tr> <td colspan="4"> <img border="0" src="images/KainosCircles.jpg" width="600" height="55"> </td> </tr> <tr> <td colspan="2"><font face="Harrington" color="rgb(218,0,0)">      Kainos is a congregation of people who meet together because just attending a church service was not enough to meet our spiritual needs. We were longing for something more. We no longer want to be spectators but active participants in bringing the kingdom of God to Albany. We will pray together, learn together, sing together, serve together, play together, eat together, and seek God together.</td> <td colspan="2"><img border="0" src="images/stairstime.jpg" height="198" width="285"></td> </tr> <tr> <td background="images/circles.jpg"><font color="rgb(255,255,255)">WORDS</td> <td background="images/circles.jpg"><font color="rgb(255,255,255)"> </td> <td background="images/circles.jpg"><font color="rgb(255,255,255)"> </td> <td background="images/circles.jpg"><font color="rgb(255,255,255)"> </td> </tr> </table> </div> <body> </html> I create table with for statement and innerhtml like this: Quote: "<table id=\"tabela1\" cellpadding=\"0px\" margin=\"0\" cellspacing=\"0px\" class=\"main_table\">" +<tr> +"<td><input type=\"text\" id=\"cell_[1-81]" + + "\"" + "class=\"border_bottom" style=\"width: 20px; text-align:center; color:red; font-style:italic; font-weight:bold; font-family:Arial padding:0px;\" name=\"cell_[1-81]\" + " maxlength=\"1\" onchange=\"check_set_grid_value(this,grid)\" onClick=\"remove_spaces(this)\"></td>" +"</tr>" +"</table>" CSS classes: Quote: .main_table{ border:2px solid #000; } .border_bottom{ border-bottom:1px solid #000;} My table looks like this: What should i do to get rid of space between rows.. Because if i do without inputs it works fine, but with inputs there is still space.. Plz help PS: Code is used in c# asp application. and i just coppied here part of it so you would see how table is made.. Numbers are adde to inputs with javascript. My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the code: <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> This may be a noob question, but I am building an HTML form (with a little Javascript) that allows a user to enter ordered-part information, which, when submitted, opens a blank email and fills in all of the variables in a specific context for other users to see. I'm not having a problem with any text variables, and I wasn't having a problem with the listbox that I was using. However, when I tried to convert the listbox to radio buttons (it's only two options), the variable returns "undefined" in the email body. Here's the email function: HTML Code: function testResults (form) { var VarStatus = form.Status.value; parent.location="mailto:tony.smith@domain.com;?Subject=Ordered Part Info&body=VarStatus; } Then here's the radio button script: HTML Code: <input type="radio" name="Status" value="ISU">Issued</input> <input type="radio" name="Status" value="DUO">Due Out</input> And here's the listbox script that did work: HTML Code: <SELECT NAME="Status"> <OPTION VALUE="ISU">Issued <OPTION VALUE="DUO">Due Out </SELECT> Like I said, everything worked fine before with the listbox. Any ideas? I recently put several forms on my website. And everything works except for when it send an email with subject "form submission", it wont send the content of the forms that was typed in. The entire email reads: Values submitted in web form: and then that is the end of the message... even if the forms are filled out... i have the form redirect to a "thank-you" page after you click submit and then i have this code in the thank-you page: <script language="php"> $email = $HTTP_POST_VARS[email]; $mailto = "email@address"; $mailsubj = "Form submission"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Values submitted from web site form:\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; } if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); } </script> any help would be appreicated... hi. I put up 2 forms on my site bwsciencelabs.com and they both work well, except they won't send. What am I doing wrong? Thanks I've accidentally deleted my main page on which I've been working for a few days. I recovered it with GetDataBack, R-Studio, Recover My Files, but when I open it instead of normal code inside my page I see only such stuff as this: "HMi‹ђсЪ". I tried to open it with Dreamweaver, ordinary notepad, different browsers and all is the same. Did anybody face such a problem or know how to solve/recover it properly? This should be so simple task but no. How can I pass input field value to the function? What I read from the input field, as soon as I press the "Save results" the value of the input field should be passed within the function. All I can do is puit 'stuffhere' and it works but simply can not manage to retriveve the input data! <form name="inputData"> <input type="text" name="userName" size="32"/><br /> <a href="#" OnClick="SetText('resultHandler','Username',' stuffhere ');SendMessageToTheObject('resultHandler','saveResult');return true;"><font color="red">[Save result]</font></a> </form> I've made my email newsletter using html and uploaded it to my server. I only need to get the html coded newsletter into the gmail client. After searching on google for a couple hours I've gotten frustrated not being able to find the correct method of doing this. I tried clicking and dragging from the uploaded html file in my internet browser, which sort of works except I then lose all the hyperlinks (text and image) in the transfer. What exactly is the process in doing this? Thanks a ton! In the past I embedded several (with makers permission) youtube clips into a html web page (with the file stored on my server). It worked fine. But now I am trying to imbed the higher quality youtube version (codec mp4a), again, with the file stored on my server, and the code I used previously doesn't work... Can anyone advise on what I need to do? What the correct code is etc. I have googled it, but am more confused than when I started! Thanks in advance :-) Hi folks first time on this particular board. I once encountered a realy simple "CMS" system. somehow there was an area on "index.htm" that called in a .txt file and displayed it. what would the code be to do this? I thought about Iframes but this is depricated nowadays. Also I want to use this method (if it exists) to build an admin area which writes to the afore-mentioned .txt file in order to make simple updates to the text on the site. Can I do this? Thanks for helping sorry im a bit of a n00b! I just launched my first web page (free on GoDaddy) and it doesn't run right. It is only simple html. it keeps trying to reload. I thought at first the header GD inserts was try to fit into a space not big enough, so I put in a few <br/> to make room but that did not work. Here is a sample of my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> </head> <frameset rows="18%,82%"> <frame src="CryofFreedomheader.htm" marginwidth="0" marginheight="0" scrolling="no"/> <frameset cols="25%,75%"> <frame src="navbar.htm"/> <frame src="cofcontent.htm" name="cofcontent" /> </frameset> <noframes> <h1>>This frameset document contains:</h1> <ul> <li>page1</li> <li>page2</li> <li>page3</li> </ul> </noframes> </frameset> </html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>cofcontent</title> </head> <body> <br/> <br/> <br/> <br/> <br/> <h1></h1> <p style="font-size: 15pt; font-weight: bold"></p> <p> © 2009 </p> </body> </html> Any help will be appreciated. Hi everyone, I'm new to the board and wondered if I could pick your brains... I'm in the process of finishing off a website to showcase my photography work. There is one small problem with it that has been bugging me. On two of the pages, the menu buttons are higher up than on every other page. I've tried fixing it in FrontPage, but had no luck so far. If anyone could help me figure out why this is so I can fix it I'd be very grateful! Many Thanks, James Hello, i would like a code that would allow one user at a time to enter ONE word into a box and submit, once its submitted the word is put on the page, in order so it creates a sort of story. Any help is good!! Hi. In a table data I have four lines of text each line separated by a <br> The text are different font sizes. The issue I am having is that the lines have space between them above and below. How do I get the lines of text closer together using simple html? text line 1 | (this space) | text line 2 Regards Hi, check this code out: HTML Code: <div id="Login Top"> <form action = "http://www.bfndevelopment.com/cgi-bin/home/Members/Password/NetLock.cgi?SiteID=19873&LockID=5465&Frame=1" method = "POST"> <input type = "hidden" name = "login" value = "false"> <!-- if "true" and someone tries logging in with no username, they will be --> <!-- prompted to enter there username and password again, on our template --> <table border = 0 <table border = 0 cellpadding = 0 cellspacing = 0 width = 300 height = 100> </td><tr> <table border = 0 cellpadding = 3 cellspacing = 0 width = 300 height = 20> <input type = "text" class="signin" name = "UserName" value="Username"onclick="if (this.value == 'Username') { this.value = ''; }" size = 5> <input type = "password" class="signin" name = "PassWord" value="Password"onclick="if (this.value == 'Password') { this.value = ''; }" size = 5> <input type = "image" src="http://www.islamcentre.net/library/loginbtn.gif" value = "Login"></div> </table> </form> Now, If u view this code on a browser, the login button appears to be slightly raised. What is the problem. I want it to be on the line, not a little higher. if anyone could slightly adjust this to it being on the line it would be much appreciated. Thanks |