Jump to content


  • Posts

  • Joined

  • Last visited

About shaffiq_fiq88

  • Birthday 10/15/1988

Previous Fields

  • Languages
    ASP VBScript, Visual Basic Application, ASP.NET Vb

Contact Methods

  • MSN
  • Website URL
  • ICQ

Profile Information

  • Location
  • Interests
    ASP.NET Server Control & Class Library programing, Javascript

shaffiq_fiq88's Achievements


Newbie (1/7)



  1. <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style type="text/css">.sectionseparator { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 0px;}.sectionseparator:hover { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 101px;}.sectionseparator.open { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 27px;}.sectionseparator.open:hover { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 64px;}</style><script language="javascript" type="text/javascript">function imgHover(o){ //what script shoud I put here??};function showHideInfo(o){ //Don't worry about this. Already done.};</script></head><body><a id="section-spg" href="#" onClick="showHideInfo(this);" onMouseOver="imgHover(this);"><img id="section-spg-img" src="/asset/image/invis.gif" width="27" height="27" class="sectionseparator" style=" position:absolute;margin-top:5px;"> <div style="display:inline-block; position: relative; top:6px; left:35px;">SPG</div></a><div id="spg-info">SPG Info</div></body></html> I want background image of 'section-spg-img' changed as 'sectionseparator:hover' when I hover mouse in any region within 'section-spg'. I've searching and try every event method. Either I'm stupid enough and failed or I'm not understand anything about event. Image sprite contain {+,hovered +, -, hovered -}. showHideInfo() change either + or - of the image and show or hide 'spg-info'. (success) imgHover() change either hovered + or hovered - of the image. (failed) Example : http://www.microsoft.com/en-us/download/details.aspx?id=30653 (Detail, System Requirement, etc...) I don't wanna use jQuery. Thank you.
  2. I want to capture keypress event while passing other value in function. I've already and still googling but still not found the answer.Here is the coding : function inputkeyup(i){if (event.keyCode!==13){// do something like thisalert(i.value)};};<input name="myipt" type="text" id="myipt" size="15" maxlength="12" onKeyUp="inputkeyup(this)"><input name="myipt2" type="text" id="myipt2" size="15" maxlength="12" onKeyUp="inputkeyup(this)"> Latest Firefox console tell "ReferenceError: event is not defined" and the code is not functioning How to make it working? No jQuery please because I will learn nothing. Thanks for any help.
  3. function keyE(e,n,v) {// some function here}; function editProp(n) {// the caller is a button with function onClick="editProp('userID')"// n = 'userID'var dStr = document.getElementById(n).innerHTML;document.getElementById('f_' + n).innerHTML = '<input type="text" name="i_' + n + '" id="i_userID" value="' + dStr+ '" onkeypress="keyE(event,' + n + ',this.value)" />'; //error heredocument.getElementById('i_' + n).focus();document.getElementById('i_' + n).setSelectionRange(0,dStr.length);} // debug with Mozilla Firefox 15.0.1 Developer Tools The editProp(n) function generate error and I don't know how to fix it. The error is at document.getElementById('f_' + n).innerHTML = '<input type="text" name="i_' + n + '" id="i_userID" value="' + dStr+ '" onkeypress="keyE(event,' + n + ',this.value)" />'; The phrase onkeypress="keyE(event,' + n + ',this.value)" generate error "userID is not defined". userID is a string defined in n variable but it detect it as a variable. How to fix it? Thanks for any help provided.
  4. What happen?The page generate an error. The server can't tell the real error to the client/remote computer for security reason (to protect your source code). I'm the client and I can't see the real error. Only testing server can tell the error. The testing server is your computer. So you must run the page from your localhost.How to solve?The error generated is not the real error. To view the real error, run the page on localhost and it will show your real error (not the error that you see on ns-llc.com). After that, you can solve your problem.I hope this will solve your problem.
  5. Dim MyCommand As New SqlCommand("Select * From MyTable Where MyField = @MyQString", MyConnection)MyCommand.Parameters.Add("@MyQString", SqlDbType.VarChar)MyCommand.Parameters("@MyQString").value = Request.QueryString("courseID") I'm not really sure about those script because I'm using ADO.NET (OleDbCommand, OleDbConnection, OleDbParameter). You are using MySQL and I think those script should work. Give a try.
  6. I have a problem. How to know which button is clicked by the user and how to do it across a frame?PAGE.HTML <html><head><script type="text/javascript" src="pathToModalScript/dhtmlModal.js"><script type="text/javascript">function OpenModal(){var MyModal=dhtmlModal(ModalData)MyModal.onClose=function(){// When button click, the modal will close and before close, all code is processed here.// My problem start here. I don't know to replace ButtonA clicked, ButtonB clicked with what conditional syntax.if (ButtonA clicked) {// Button A code. I don't have problem here.} elseif (ButtonB clicked) {// Button B code. I don't have problem here.} else {// Other button code. I don't have problem here.}// My problem end.return true //close modal after process data from modal.}}</script><body><a onClick="OpenModal()">Open My Modal</a>/* This iframe is generated on-the-fly automatically by the dhtmlModal.js when Open My Modal link is click. So the iframe is the modal window.<iframe width="100%" height="150" src="modal.html"></iframe>*/</body></html> MODAL.HTML <html><head></head><body><form name="MyForm" id="MyForm"><input type="Button" id="ButtonA" name="ButtonA" value="Yes" onClick="parent.MyModal.hide()" /><input type="Button" id="ButtonB" name="ButtonB" value="No" onClick="parent.MyModal.hide()" /><input type="Button" id="ButtonC" name="ButtonC" value="Cancel" onClick="parent.MyModal.hide()" /></form></body></html> How to know which button is clicked? The problem is, Modal.html is in iframe and I don't know how to create function to detect which button is clicked.I got the script here http://www.dynamicdrive.com/dynamicindex8/.../dhtmlmodal.htmAny help is really appreciated. Thanks.
  7. Thanks. Now, I understand it. Thanks so much.
  8. Hello.I'm new to PHP, a beginner. I downloaded a text editor and the only server scripting use by the text editor is PHP. I want to rewrite the script to ASP server scripting. However, I found a syntax that I don't understand. I'd tried searching in google and W3Schools.com but didn't find its function. $_GET['dir'] = $_POST['dir'] ? $_POST['dir'] : $_GET['dir']; What is the function of that syntax?
  9. I'll try my best to answer the problem.First correction :You use a function within a function. It is like a wheel. There is no ending. This is your code. Function A(ByVal vA As String, ByVal vB As String) As String Dim ReturnVal As String = Nothing A("Data for vA","Data for vB") Return ReturnValEnd Function You make function A but you call function A in function A. You make function login and you call function login in function login. There is no ending. So when you execute the script it will be like this :Step 1 :Execute login function.Step 2 :Execute login function while the current login function is running.Step 3 :Execute login function within the login function while the login function is running withing a running login function.Step 4 :Step 3 + Step 2Step 5 :Step 4 + Step 2Step 6 :.......................Second Correction :Avoid use button to call a function. Use button to call a method sub. It is a little complicated to call a function with a button because you have to add event handler by using AddHandler method. If you using sub procedure, it is more simple. Public Sub DoLogin() Handles ButtonId.Click If Login(UserID.text,Password.text) = True Then LoginMsg.text = "Your ID is true" Else LoginMsg.text = "Try again." End IfEnd SubPrivate Function Login(ByVal fUserID As String, ByVal fPassword As String) As Boolean Dim ReturnVal As Boolean = False 'Some code for login Return ReturnValEnd Function One more thing, this is .NET programing. You should transfer this post in .NET room so there will be more people can help you.
  10. You use ASP, meaning that you use code block that need to be processed by the server. So there is no any chance that the visitor can download the .asp page even if they know where it is.<%@Language="VBScript"%> directive will make sure and always make sure that the .asp page is processed before it can be viewed. If you .asp form handler just contain code block, it mean nothing to be viewed. If the visitor load the page by typing the URL ie:http://yourdomain.com/process.asp, it will only show a blank page with blank page source unless there is coding error made by yourself.Anyway, it is about form processing. You may put conditional variable to make it safer.If request.form("dataA") = "" ThenResponse.Redirect("/error.asp")Else'ContinueEnd IfOr you may create a session variable.Also try to avoid using On Error Resume Next.The main thing is, turn off directory listing.That is all I can give. Hope others can give you more satisfy solution.Happy scripting.
  11. *.dbf extension is DBase type database. The provider for this type of database is Microsoft.Jet.OleDb.4.0 (Microsoft Jet OLEDB Provider). Meaning that it can make database connection to the DBase file.You also have second choice. You may use Access 2007 application to convert from DBase to Microsoft Access Database. Make sure to create a backup copy of the original DBase file before making any conversion.
  12. I'm using Windows 7 too. Of course .NET Framework can be turn on from Windows Features On/Off but if some error happen, you can try to download the redistributable package of .NET Framework from Microsoft.com. Just download version 3.5 and 4.0. 3.5 contain full distribution of 2.0 and 3.0.If the error involving IIS, it mean that your installation sources is missing something. IIS come with Windows installation so you may have to repair your system or in worst case you have to reformat your system.One more thing, if post this thread in .NET forum room, I think you will get more help. This is ASP forum room.Happy learning.
  13. Try using ASCII Character. <input type="text" name="uid" value="fr" & Chr(232) & "d" & Chr(232) & "ric" /> or <input type="text" name="uid" value="frèdèric" /> or <input type="text" name="uid" value="fr&#232;d&#232;ric" />
  14. Try import and use System.Windows.Forms.DataVisualization.Charting namespace. Must have .NET 4.0.
  • Create New...