Jump to content

Kaoru

Members
  • Posts

    25
  • Joined

  • Last visited

Kaoru's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Below is the ASP code that I found to do (hopefully) what I want done: <%Set myMail=CreateObject("CDO.Message")myMail.Subject="Sending email with CDO"myMail.From="mymail@mydomain.com"myMail.To="someone@somedomain.com"myMail.HTMLBody = "<h1>This is a message.</h1>" myMail.Sendset myMail=nothing%> Does this differ at all from the asp.NET code that does the same thing? I've been looking, but I can't find asp.NET code...
  2. I have the code for an email form, but I'm at a loss regarding where on the page to put it.I got the code from w3schools, but, I don't know whether or not to put it above the DOCTYPE and <html> declarations, or in the html code where I want the form to appear on the page.I'm an ASP newbie (only just started learning about a month ago) so I'm still not sure how things work.Any help would be appreciated.
  3. Kaoru

    Email form

    I've made myself an email form: <form action="mailto: me@this.domain.com?subject=Whats a subject?" method="post"> Above is just an example of what I've done...but when I try to test it, it opens a blank email instead of sending the email. could this be because I haven't uploaded the page yet?
  4. Ah, well, the expandable block almost works 100%...My only problem now, is that in most of the applications I've set for it, the text saying "Show Expandable Block" doesn't display on the page when it loads.<a href="http://astralwd.bravehost.com/expand.html">Here's an example for reference</a>
  5. Ok, I managed to fix the problem!Seems that since I'm still relatively new to JS, I wrote the function above to make the block expand. I left out another function that's needed, once I included that, it all works 100%.
  6. I don't have webspace for the site yet, unfortunately. I'm still developing the site and I'm waiting for payment so that I can get webspace.Any ideas so far?A friend said to change the hyperlink to<a href="java script: expandCollapse('tabInfoBlockID', true);setTabInfo('tabInfoBlockID'); return false;"> but that doesn't do anything (the block doesn't even expand)Then he said: I'm not sure what he meant by that, so I haven't done anything (just reset it to the way I had it originally)
  7. The error comes up when I click the link. Here's the java script:function expandCollapse(elem, changeImage){ if (document.getElementById) { ecBlock = document.getElementById(elem); if (ecBlock != undefined && ecBlock != null) { if (changeImage) { elemImage = document.getElementById(elem + "Image"); } if (elemImage != undefined && elemImage != null) { if (ecBlock.currentStyle.display == "none" || ecBlock.currentStyle.display == null || ecBlock.currentStyle.display == "") { ecBlock.style.display = "block"; if (changeImage) { elemImage.src = "Images/up.jpg"; } } else if (ecBlock.currentStyle.display == "block") { ecBlock.style.display = "none"; if (changeImage) { elemImage.src = "Images/down.jpg"; } } else { ecBlock.style.display = "block"; if (changeImage) { elemImage.src = "Images/up.jpg"; } } } } }} I don't think it's a problem with the JS because the JS is in an external file. The browser reports a the error to be on the .html page.
  8. This one confuses me quite a bit...I've coded an expandable block on my page, and it works fine, but my browser keeps giving me an "object expected" error on the hyperlink. <a href="#" onclick="expandCollapse([color="#FF0000"]_[/color]'tabInfoBlockID', true); setTabInfo('tabInfoBlockID'); return false;"> I've put a red underscore where the browser tells me the error is.Apparently it's not a fatal error, seeing as the block expands, but since this site is for my business, I'd like to look as professional as possible and having errors popping up doesn't look professional
  9. I wanted to password protect a few of my pages too, and although everyone told me it's better to do it with php, I did it with javascript. It's secure enough for me considering the info behind the password protection script isn't sensitive stuff:Here's the javascript code: function protect(form) { if (document.passform.password.value == "password here") { alert("Password correct, forwarding..."); document.location.href="members.html"; } else { alert("Password Incorrect"); } The document.passform.password.value would be the <input type="text"> field on the form (in this case the form is named "passform")Here's the form: <form name="passform"> Password: <input type="password" name="password" /> <BR> <input type="submit" value="Submit" onClick="protect(form)"></form> So that's it. Useful if you're not protecting any sensitive stuff (credit card details and such).
  10. Thanks Lulzim, never wouldda thought of that... I'm still pretty n00b really, working on getting better tho
  11. I've just finished working on my "members only" section - I know, JavaScript isn't the best thing to use for security, but it's all I know how to use.I'm using a cookie to store the username supplied when the password is entered correctly, when the user views the main page on the secured section of the site, it brings up an alert with a welcome message.Instead of using an alert, I want the function to write a welcome message on the page itself without replacing any text already on that page: Above show how I want it to look, below shows the function that checks for the cookie's existance and supplies the welcome message:
×
×
  • Create New...