Jump to content

Blueie

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Blueie

  1. Hello

     

    I am getting the above JavaScript error with fading images in an ASP.NET project.

     

    I do not know what causes the error or how to correct it. There are no images on the Web page at the moment, only a link to the JavaScript file that contains the error below:

     

     

     

    function gallery() {  //if no images have the show class, grab the first image  var current = ($('ul.slideshow li.show')?  $('ul.slideshow li.show') : $('#ul.slideshow li:first'));  // trying to avoid speed issue  if(current.queue('fx').length == 0) {     // get the next image, if it reached the end of the slideshow, rotate it back to the first image    var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption')? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first'));         // get the next image caption    var desc = next.find('img').attr('alt');      // set the fade in effect for the next image, show class has higher z-index    next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);       // hide the caption first, and then set and display the caption    $('#slideshow-caption').slideToggle(300, function () {      $('#slideshow-caption p').html(desc);      $('#slideshow-caption').slideToggle(500);    });       // hide the current image    current.animate({opacity: 0.0}, 1000).removeClass('show');  }}

     

    Thank you for any advice.

     

    Blueie

  2. Hello

     

    I am trying to follow the tutorial here:

     

    http://www.w3schools.com/website/web_asp_login.asp

     

    except that I have added one more field for email. However, I am getting the following error message:

     

     

    Microsoft JET Database Engine error '80040e14'

    Syntax error in INSERT INTO statement.

    /schoolsReg/Register1.asp, line 45

     

    Line 45 is this: conn.Execute(sql), but the INSERT INTO statement is on the above line:

     

    sql="INSERT INTO userlist (username, password, strEmail) VALUES ('" & username & "','" & password & "', 'strEmail')"

     

     

    The rest of the code looks like this:

    <%username = ""password = ""confirmPassword = ""strEmail = ""ErrorMessage = ""if request.form <> "" thenusername = Request.Form("username")password = Request.Form("password")confirmPassword = Request.Form("confirmPassword")strEmail = Request.Form("strEmail")  if strEmail="" or password="" then     ErrorMessage = "You must specify both email and password."  end if  if password <> confirmPassword then    ErrorMessage = "Password and confirmation do not match."  end if  if ErrorMessage = "" then     set conn = Server.CreateObject("ADODB.Connection") conn.Provider = "Microsoft.Jet.OLEDB.4.0" conn.Open("E:myDatabase.mdb")    set rs = Server.CreateObject("ADODB.recordset")    rs.Open "Select * FROM userlist WHERE strEmail = '" & strEmail & "'", conn    if rs.EOF = true then      sql="INSERT INTO userlist (username, password, strEmail) VALUES ('" & username & "','" & password & "', 'strEmail')"      conn.Execute(sql)      Response.Redirect("Default.asp")     else      ErrorMessage = "Email address is already in use."    end if  end ifend ifif ErrorMessage <> "" then  response.write("<p>" & ErrorMessage & "</p>")   response.write("<p>Please correct the errors and try again.</p>") end if%><h1>Register</h1><form method="post" action=""> <fieldset><legend>Sign-up Form</legend><ol><li> <label>Username:</label><input type="text" id="username" name="username" /> </li><li><label>Password:</label><input type="password" id="password" name="password" /></li><li><label>Confirm Password:</label><input type="password" id="confirmPassword" name="confirmPassword" /></li><li> <label>Email:</label><input type="text" id="strEmail" name="strEmail" /> </li><li><p><input type="submit" value="Register" /></p></li></ol></fieldset></form>
×
×
  • Create New...