|
without connecting to internet, is it possible to test email / autogenerate emails using "localhost"?
|
|
|
|
|
If you have a local smtp server. There are other programs that fake this but you'll have to do some searching.
|
|
|
|
|
|
Neonlight and Matthew, thanks for the response. I shall get back to you.
|
|
|
|
|
Hi,
I need to find a way to detect which PHYSICAL key is pressed, using Javascript. The best that JS can offer, as far as I can see, is finding the Virtual Key code of a key (With onkeyup/onkeydown), which doesn't always map to the same physical key (For example, the key under 6 and 7 on the US keyboard is Y and sends DOM_VK_Y virtual key code, but in the German layout it's Z and it sends DOM_VK_Z). Those VKs would be enough info if I knew which keyboard layout the user is using.
Some background on keyboard layouts, because this is a confusing subject: A keyboard sends a scan code, which is more or less standardized across all "normal" keyboards, so that key under 6 and 7 (The US layout Y and German Z) always sends the same code. The OS (Let's say Windows) translates that into a Virtual Key code, that in case of the latin letters is usually the same as the ASCII code for the letter on the key, but really doesn't have to be the same, and with non-latin-script languages, it isn't. You can look up VK_* constants in Win32 API. That translation is dependent upon the current layout. From there, the VKs are translated to characters, again, according to the keyboard layout.
If I get the VKs (easy part) plus know the current layout (what I'm asking), then I can check the tables and see what physical key was pressed. I'm also open to other methods I may not have thought about.
What I have already tried:
1. Flash - Tried using ActionScript functions to get the browser's current keyboard layout. Can't be done. Tried using Flash's keyboard events to get the scan codes (Windows' WM_CHAR and the likes have that info in them), but Flash doesn't supply that info. I might have missed something there, because I couldn't find good documentation on the subject.
2. Java Applets - Since the Java plugin gets loaded once per browser session, I can only get the layout the browser process had when when a Java applet was first called, and who knows when that was. Changing the layout in the browser doesn't affect the layout in the Java plugin, so there's no way to tell what happened since Java was first loaded. I used java.awt.im.InputContext.getInstance().getLocale(). Using a Java textbox instead of an HTML element is out of the question for various reasons.
3. JS dispatchEvent/fireEvent - Tried to see if I can emulate the pressing of certain VKs and see what Unicode chars they generate, and try to guess the layout from that. Unfortunately, Javascript can't really emulate keystrokes, just single events, so onkeydown (That has VK info) didn't cause onkeypress (That has char code info) to be generated, so that can't be used.
At that point my ideas ran dry. I hope that listing them here would at least help someone else think of something...
Thank you!
|
|
|
|
|
how to execute php code from mysql (phpmyadmin)?
Thanks
|
|
|
|
|
Why do you want to do that ?
It's not a recommended way !
You ought to find other ways for it
|
|
|
|
|
It is possible - but i can't remember the function that lets you run stored code. Still , I think you're better off finding another way too though. Why not just make a function and grab individual bits of the database as & when you need them.
|
|
|
|
|
Thanks from your comments and kind guidance.
i found the solution there is a specific function for it
eval()
Thanks
|
|
|
|
|
|
i came across a manual that gives instructions on how to set up websites/webpages from scratch using notepad and saving as html. what i am trying to find out is, are there special codes or instructions on how to add functions to your website/webpage? right now i am only as far as adding the header, body and i have just started adding links to my email address etc. is there a way to add like an order form, guest book?

|
|
|
|
|
If you're going to start adding things such as a guest book, and especially an order form, you need to start learning server side languages and probably databases. The most common server-side languages/frameworks these days are probably php and ASP.NET (with VB.NET or C# as a language). I recommend looking for a book such as Beginning PHP or Beginning ASP.NET Databases using C#, and working through the book from start to finish.
Scott
|
|
|
|
|
|
You might also be able to find a flat file script that will do what you want (A flat file is just a text file that holds all your data - not a database).
Try searching google for: "flat file guestbook"
|
|
|
|
|
hi
my html form contains a table tag .
i would like to populate this table using a javascript function.
my probllem is that i created a table that contains another table inside on of the tags. i tried to write the most basic code:
var myTable = document.createElement('tbody');
var row1 = document.createElement('tr');
var col1 = document.createElement('td');
var but1 = document.createElement('input');
but1.setAttribute('type','button');
but1.setAttribute('value','button1');
col1.appendChild(but1);
row1.appendChild(col1);
myTable.appendChild(row1);
var row2 = document.createElement('tr');
var col2 = document.createElement('td');
var nestedTbl = document.createElement('tbody');
var row3 = document.createElement('tr');
var col3 = document.createElement('td');
var but2 = document.createElement('input');
but2.setAttribute('type','button');
but2.setAttribute('value','button2');
col3.appendChild(but2);
row3.appendChild(col3);
nestedTbl.appendChild(row3);
col2.appendChild(nestedTbl);
row2.appendChild(col2);
myTable.appendChild(row2);
MainTable.appendChild(myTable);
when i run the javascript function it creates the table 'MyTable' and shows the first button but ignores completely from the inner table.
is there a way to achieve my goal ? |
|
|
|
|
|
|
|
You do know that a table tag is "TABLE" and not "TBODY", right? The TBODY is inside the TABLE and can contain TRs. It is not a table by itself.
You didn't show us what "MainTable" was, so I hope that you previously set it to the actual table node. However, clearly your "nestedTbl" is not a valid table.
By the way, I have noticed that some browsers have a problem with TH elements. I have not been too careful in investigating, so I cannot tell you specifics. Just be sure to test a little bit at a time.
Also, make sure you use a JavaScript debugger like Dragonfly (Opera) or Firebug (Firefox). These tools will be a lifesaver.
Don't let my name fool you. That's my job.
|
|
|
|
|
Here is my code:
<br />
<object id="ZKFPEngX1" classid="CLSID:CA69969C-2F27-41D3-954D-A48B941C3BA7"><br />
</object><br />
<script id="ZKFPEngX1_OnCapture" for=ZKFPEngX1 event=OnCapture(ActionResult,ATemplate) ><br />
LastCaptureTemplate = ATemplate;<br />
FingerPrint.GetCqryFingerData(GetCqryFingerDataCallback); <br />
</script> <br />
<script type="text/javascript" language="javascript"><br />
var ZKFPEngX1 = document.getElementById("ZKFPEngX1");<br />
var RegFeatureChanged = false;<br />
var LastCaptureTemplate;<br />
<br />
ZKFPEngX1.InitEngine() <br />
ZKFPEngX1.BeginCapture();<br />
<br />
function GetCqryFingerDataCallback(response)
{<br />
var t = response.value.Tables[0];<br />
var FoundPID = "";<br />
for (i=0;i<t.Rows.length;i++)<br />
{<br />
var StoredTemplate = t.Rows[i].FINGERPRINT;
if (ZKFPEngX1.VerFinger(LastCaptureTemplate, StoredTemplate, false, RegFeatureChanged))<br />
{<br />
FoundPID = t.Rows[0].PID;<br />
break;<br />
}<br />
}<br />
}<br />
</script><br />
And here is our vender's SDK documentation:
<br />
VB language expression is used here, and fingerprint template Variant variable show as one-dimension byte arrays.<br />
<br />
Function VerFinger(byval regTemplate, verTemplate, AdoLearning As Boolean, byval AregFeatureChanged As Boolean) As Boolean<br />
<br />
Events: <br />
OnCapture(ActionResult AS Boolean, ATemplate)<br />
When calling VerFinger(), it generate an error: Variant is not an array.I type 'typeof LastCaptureTemplate' in the debug window and it returns 'Unknown'. I think this is because VB array and Javascipt array are Incompatible.
Can any one help me? Any idea will be appropriate. Thanks a lot.
Also thanks CodeProject. I have got a lot of help here.
|
|
|
|
|
:(( <script>
onerror = function(a,b,c) { alert(a+c) }
</script>
<script type="text/javascript">
function _isEmail()
{
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if( reg.test(this.value) )
alert("yes")
else
alert("no")
}
Object.prototype.isEmail = _isEmail
</script>
<input type="text" name="email" id="email" value="sdf@sdf.com" />
<script>
document.getElementById('email').isEmail()
</script>
the above code works well in firefox but not in IE6 or IE7 and i didn't check it in IE8...
i am trying to extend the Object type to add this isEmail method
so that i can call this function on any object like input elements...
since all the elements are basically of the type Object it should work and it works in FF... is there any frame work to do this... what about prototype.org... ???
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Hello,
I am posting this question again. Please anyone could help me in this matter.
I have a modalpopup where I want to Allow user to add or Modify a record,
On Clicking Modify, the ModalPopup Works properly, showing the record details selected by User for Modification, but on Clicking Add button, the Modalpopup does not show blank controls but displays the same record which was selected for Modification.
Please anyone could tell me how can i refresh the modalpopup to make all controls in the modalpopup blank and then display the popup.
Thanks in Advance.
|
|
|
|
|
It would have been easier if I could see your code... |)
|
|
|
|
|
where is the best place to find viable HTML source code to place add-on's with my website?
|
|
|
|
|
Do you understand what you want, because your question makes no sense. What do you mean by viable html source code - html does not have source code, it just displays.
patrice pilgrim wrote: place add-on's with my website
Do you mean additional pages?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|