i have written ajax code and save as ajx.js and i have written my asp code and saved as addwork.asp my problem is when i click on image go then it should insert records into database without reloading the page but it reloads the page so please help me here is my code below addwork.asp code below <!--#include file="common.asp"--> <!--#include file="headers.asp"--> <script type="text/javascript" src="ajx.js"></script> <% q=request("q") CheckAdminLogin() OpenDataBase conn 'if request("flag")=1 then 'compl=0 means task is pending 'compl=1 means task is completed 'compl=2 means task is cancelled completed=0 uname=request("uname") txt=request("txt") dat=now if uname="" then er=er & "Title cannot be blank" if txt="" then er=er & "Work description cannot be blank" if er="" then sql="insert into wrk(titles,desck,datss,usernames,userid,completed) values('" & cstr(uname) & "','" & cstr(txt) & "','" & cstr(dat) & "','" & session("adminname") & "'," & session("userid") & "," & completed & ")" conn.execute sql response.write "<font size=4 color=green>work description Submitted sucessfully</font>" else response.write "<font color='#FF0000' size='+1'>" & er & "</font>" end if 'end if %> <form action="addwork.asp" method="post"> <table> <tr> <td> <font size="+1"> Title</font> </td> <td><input type="text" name="uname"></td> </tr> <tr> <td><font size="+1">Work</font></td> <td> <textarea name="txt" rows="20" cols="35"></textarea> </td> </tr> <tr> <td></td> <td><input type="hidden" name="flag" value="1"> <!--<input type="submit" name="submit" value="submit" onClick="showHint(this.value)">--> <INPUT TYPE="image" SRC="submit_button.gif" HEIGHT="30" WIDTH="173" BORDER="0" ALT="Submit Form" onClick="showHint(this.value)"> <span id="txthint"></span> </td> </tr> </table> </form> addwork.asp code ends here now ajx.js code starts below var xmlhttp; function showHint() { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support XMLHTTP!"); return; } var uname=document.getElementById("uname").value; var txt=document.getElementById("txt").value; var url="addwork.asp"; url=url+"?unam
rajiv_kadam
Posts
-
submit a form using ajax not working and page is still reloaded -
windowsmediaplayer not playing in mozillaa firefoxbelow is my code for playing videos but problem is that video player is hidden automatically after playing videos in mozilla browser but it works ok in internet explorer browser and i m playing .avi files please suggest me.i have use only this much code for playing videos on my website. <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="900" height="600" style="background-color:black"> <param name="fileName" value="<%=videopath%>"> <param name="animationatStart" value="true"> <param name="transparentatStart" value="true"> <param name="autoStart" value="true"> <param name="showControls" value="true"> <param name="Volume" value="-450"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.bigbonenews.net<%=videopath%>" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450> </object>
-
innerjoin problem in sql queryi m displaying records from database in which id of first table and second table should be same so i used inner join but it gives error of type rs mismatch when i display that please help me i m using ASP script. datatype of news_id is autonumber and newsid datatype is number <% OpenDataBase conn sql3="select * from news inner join newsimage on news.news_id =newsimage.newsid" set rs=server.createobject("adodb.recordset") rs.open sql3,conn,1,1 response.Write (rs("news_titile")) %>
-
slideshow problemmy images are not displayed in slideshow and images are fetched from database and path is also right but stilll images are not displayed please help me <!--#include file="common.asp"--> <html><head></head><body onLoad="scrolls()"> <% OpenDataBase conn sql="select top 1 * from news order by news_id desc" set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 x=obj("news_id")-10 sql2="select * from newsimage where newsid>=" & x set obj2=server.CreateObject("adodb.recordset") obj2.open sql2,conn,1,1 while obj2.eof<>true path=path & """../images/" & obj2("imagename") & """," 'c=c+1 obj2.movenext wend path=left(path,len(path)-1) %> <img src="" name="rotateimg"></img> <script language="JavaScript"> arrs=new Array(<%=path%>); counter=0; arrslength=arrs.length; function scrolls() { if(document.rotateimg.complete) { counter++; if(counter==arrslength) { counter=0; } document.rotateimg.src=arrs[counter]; setTimeout("scrolls()",6000); } } </script> </body> </html>
-
textchanging with imagechangingi want to display headline whose id matches with the image id of slide show.i tried my best but its not done. so please help me .how to display headline along with slides show of images one by one.below is my code and if u didnt understand my question then go to www.bigbonenews.net in this site the image changes along with the headline like that i want .my image change code is working but how to change headline along with image i dont know please help here is my code below Image Array <% OpenDataBase conn sql="select top 1 * from news order by news_id desc" set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 x=obj("news_id")-10 sql2="select * from newsimage where newsid>=" & x & " order by newsid desc" set obj2=server.CreateObject("adodb.recordset") obj2.open sql2,conn,1,1 while obj2.eof<>true sql3="select * from news where news_id =" & obj2("newsid") set rs=server.createobject("adodb.recordset") rs.open sql3,conn,1,1 imagestorotate=imagestorotate & """/images/" & obj2("imagename") &"""," headline=headline & """" & rs("news_titile") & """," obj2.movenext wend imagestorotate=left(imagestorotate,len(imagestorotate)-1) headline=left(headline,len(headline)-1) %> var variableslide=new Array(<%=imagestorotate%>,<%=headline%>) var slidewidth='130px' //set to width of LARGEST image in your slideshow var slideheight='120px' //set to height of LARGEST iamge in your slideshow, plus any text description var slidebgcolor='#F3F3F3' //configure the below variable to determine the delay between image rotations (in miliseconds) var slidedelay=3000 ////Do not edit pass this line//////////////// var ie=document.all var dom=document.getElementById for (i=0;i<variableslide.length;i++){ var cacheimage=new Image() cacheimage.src=variableslide[i][0] } var currentslide=0 function rotateimages(){ contentcontainer='<center>' if (variableslide[currentslide][1]!="") contentcontainer+='<a href="'+variableslide[currentslide][1]+'"> contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">' if (variableslide[currentslide][1]!="") contentcontainer+='</a>' contentcontainer+='</center>' if (variableslide[currentslide][2]!="") contentcontainer+=variableslide[currentslide][2] if (document.layers){ crossrotateobj.document.write(contentcontainer) crossrotateobj.document.close() }</x-turndown>
-
javascript slide show not workini m displaying images from database in slide show but it is not displayed here is my code arr=new Array("/images/interswitch-logo.gif","/images/bbsalogo1.PNG","/images/smartphone.jpg","/images/searchicon.gif"); counter=0; arraylength=arr.length; function slide() { if(document.img.complete) { counter++; if(counter==arraylength) { counter=0; } document.img.src=arr[counter]; setTimeout("slide()",6*1000); } }
-
slideshowproblem in aspi m using slide show which displays images from database but image is not displaying can anyone tell me here is my code below .i m working in asp script. <% OpenDataBase conn sql="select top 1 * from news order by news_id desc" set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 x=obj("news_id")-10 sql2="select * from newsimage where newsid>=" & x set obj2=server.CreateObject("adodb.recordset") obj2.open sql2,conn,1,1 while obj2.eof<>true path=path & """/images/" & obj2("imagename") & """," obj2.movenext wend path=left(path,len(path)-1) %> var interval = 2.5; var random_display = 1; interval *= 1000; var image_index = 0; image_list[image_index++] = new Array(<%=path%>); var number_of_image = image_list.length; function imageItem(image_location) { this.image_item = new Image(); this.image_item.src = image_location; } function get_ImageItemLocation(imageObj) { return(imageObj.image_item.src) } function generate(x, y) { var range = y - x + 1; return Math.floor(Math.random() * range) + x; } function getNextImage() { if (random_display) { image_index = generate(0, number_of_image-1); } else { image_index = (image_index+1) % number_of_image; } var new_image = get_ImageItemLocation(image_list[image_index]); return(new_image); } function rotateImage(place) { var new_image = getNextImage(); document[place].src = new_image; var recur_call = "rotateImage('"+place+"')"; setTimeout(recur_call, interval); }
-
filedownloadproblem(ASP)i have to download videos from specific location it is downloaded but when i play the video which is downloaded from website is not playing please help me here is my code and my site is www.bigbonenews.net/downloadvideo.asp?id=33 <!--#include file="common.asp"--> <% OpenDataBase conn id=request("id") 'if id="" then response.Write("no news is present") 'sql1="select * from newsvideo" 'set rs=server.createobject("adodb.recordset") 'rs.open sql1,conn,1,1 'while rs.eof<>true sql="select * from newsvideo where newsid=" & id set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 if obj.eof<>true then 'response.write(obj("news_titile")) body="http://www.bigbonenews.net/videos/" & obj("videoname") & vbcrlf 'obj.close 'obj.movenext end if Server.ScriptTimeout=600 'OpenDataBase conn 'body="/videos/" & vbcrlf 'response.buffer=true Dim stream Dim contents Dim filename filename=obj("videoname") body="http://www.bigbonenews.net/videos/" & filename response.buffer=true strFileType = lcase(Right(filename, 4)) 'another file code starts here Select Case strFileType Case ".asf" ContentType = "video/x-ms-asf" Case ".avi" ContentType = "video/avi" Case ".doc" ContentType = "application/msword" Case ".zip" ContentType = "application/zip" Case ".xls" ContentType = "application/vnd.ms-excel" Case ".gif" ContentType = "image/gif" Case ".jpg", "jpeg" ContentType = "image/jpeg" Case ".wav" ContentType = "audio/wav" Case ".mp3" ContentType = "audio/mpeg3" Case ".mpg", "mpeg" ContentType = "video/mpeg" Case ".rtf" ContentType = "application/rtf" Case ".htm", "html" ContentType = "text/html" Case ".asp" ContentType = "text/asp" Case Else 'Handle All Other Files ContentType = "application/octet-stream" End Select response.Write(strFileType) 'rs.close 'conn.close Response.AddHeader "Content-disposition","attachment;filename=" & filename response.contenttype=ContentType response.write body response.end %> <form action="downloadvideo.asp" method="post"> <input type="hidden" name="id" value="<%=id%>"> </form> <!--starts Main Body --> <!--startclickprintinclude--> <!--starts Top News Story -->
-
listen/watch video in asphow to make coding for listen /watch video in asp i have uploaded videos but the problem is that how to upload flv player ? i have no idea about listen /watch video. plz help
-
javascript slideshow using asphi this is my code.i want to display images whose path and image name is from database but still i m not getting the slide show working it does not show me the message.any body help me? <!--#include file="common.asp"--> <% OpenDataBase conn sql="select * from newsimage" set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 while obj.eof<>true imagestorotate=imagestorotate & """/pdf/" & obj("imagename") & """," obj.movenext wend imagestorotate=left(imagestorotate,len(imagestorotate)-1) 'response.write("image pathe is " & imagestorotate & "") %> <html> <head> <title></title> <script type="text/javascript"> var image1=new Image(); image1.src=<%=imagestorotate%>; </script> </head> <body> <img src="<%=imagestorotate%>" name="slide" width=100 height=56 atl="no image for path"> <script type="text/javascript"> <!-- //variable that will increment through the images var step=1; function slideit(){ //if browser does not support the image object, exit. if (!document.images) return; document.images.slide.src=eval("image" + step + ".src"); if (step < 3) step++ ; else step=1; //call function "slideit()" every 2.5 seconds setTimeout("slideit()",2500) } slideit() //--> </script> </body> </html> image is not changing one by one plz help me for image change coz my image is coming from database table which has 30 images..
-
ASP(match values of two table )i m displaying projectdescription whose id is retreived frm previous filename.i have two tables in my database. i m checking if both the id is matched then it should show me the description otherwise not and should display some message. if id is matched then it works fine. but if id is not matched of both the table with one another then it gives error '80020009' here is my code <% opendatabase conn id=request("id") session("id")=id sql="select * from projectdescription where id="& id set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 sql3="select * from schemedescription where projectid="& id set obj3=server.CreateObject("adodb.recordset") obj3.open sql3,conn,1,1 response.Write("id is "& obj("id")) if obj3.eof=true then response.Write("record not found") response.Write("[View Project](project.asp?id=" & obj("id") & ") ") elseif obj3.eof=false then response.Write("record found") end if if obj.eof=true then response.Write("rec not found") elseif obj.eof=false then response.Write("rec found") end if if obj("id")=obj3("projectid") then response.Write("[View Project](project.asp?id=" & obj("id") & ") ") response.Write("[View Scheme](scheme.asp?id=" & obj("id") & ") ") response.Write("[View Team](team.asp?id=" & obj("id") & ")") ' else ' response.Write("id is not match") end if %>
-
asp(scripting)i m displaying records from one table and while displaying i m passing the id field of project.asp to scheme.asp now my problem is that when scheme.asp does not contain the scheme for the project.asp then it should not show the hyperlink viewscheme on project.asp file. here is my code.....below
<% opendatabase conn id=request("id") sql="select * from projectdescription where id="& id set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 sql2="select * from schemedescription where projectid="& obj("id") set obj2=server.CreateObject("adodb.recordset") obj2.open sql,conn,1,1 if obj2("projectid")=obj("id") then response.Write("[View Project](project.asp?id=" & obj("id") & ") ") response.Write("[View Scheme](scheme.asp?id=" & obj("id") & ") ") response.Write("[View Team](team.asp?id=" & obj("id") & ")
") %><% response.Write(obj("description")) %>
" height="150" width="200" alt="Central Home Images" > <% else response.Write("[View Project](project.asp?id=" & obj("id") & ") ") response.End() end if %>
-
ASP(Tinymceeditor)Hi i m editing the data using tinymce editor in that editor i have include the file which displays submenu on the top but the problem is that the submenu is not working in tinymce it does not show submenu i dont have any idea about tinymceeditor can anyone help me .is there any settings for that? in asp(scripting language i m working).i dont know ajax.
-
paginghow to display database pagewise?
-
asp(scripting language)how to create a community and social networking site in asp
-
logic (website)how to develop programming logic ?
-
ASP(scripting)i have to fetch 100 rercords from database . at a time only 10 records should be displayed? i have hyperlink page1,page2,page3,page4. when i click on hyperlink page1 then first 10 records should be displayed. and when i click on hyperlink page 2 then it should show me the next 10 records .any body can tell me ?. how to develop logic?
-
ASP(scripting language)how to display database pagewise .? i have 100 records and on page 1 2 3 pagenumber i have to give and when i click on page 3 then it should show me the records from 31 to 40 when i click on page2 then it should show me the records from 11 to 20. please tell me.
-
asp/databaseHome >> New Token Creation
New Token Creation
Please Fill the Following Details
<% sql="Select * from user order by name" Opendatabase conn Set rsUserInfo = Server.CreateObject("ADODB.Recordset") rsUserInfo.open sql,conn,1,1 if rsUserInfo.eof=true then response.Write "
No User, So you Can't assign the token.!!
" response.End() end if if request("step")="1" then er="" username = request("username") issue = request("issue") if issue="" then er = er & "Please Enter The Issue, Issue can't be blank.
" if username="" then er = er & "Please select Username.
" flg=1 response.Write("username is" & username & "
") response.Write("issue is" & issue) if er="" then 'response.Write("comes") sql="select * from user where username='"& trim(username) &"' limit 1" Set rsAssign = Server.CreateObject("ADODB.Recordset") rsAssign.open sql,conn,1,1 ' response.Write("second") if rsAssign.eof<>true then ' response.Write("comes here") 'sql="insert into tokeninfo (issue,userid) values ('"& issue &"',"& rsAssign("id") &")" sql="update tokeninfo set issue='" & issue & "',userid=" & rsAssign("id") & "" conn.execute sql flg=0 response.Write("flag is "& flg) response.Write "Token is Created Successfully.
" 'response.End() rsAssign.movenext end if else response.Write "
"& er &"
" end if
-
ASPin database there is radiobuttonvalue stored. when form is loaded at that time it should check whether the database value is radiobutton value. if it is ,then it should show the radiobutton checked at form load.