|
shortcut are .lnk files. you can access shortcut files using IShellLink but I am not sure if this can be done from Javascript. see here[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I have done project using javascript and asp.net, however in most of the area i have used cookies in javascript..
My issues is, in some customers browser cookies is disabled ... i want that to be enable i.e when i run my webpage it should ask "Plz enable cookies" and when clicking "ok" button cookies should be enabled.
Plz help....
Ramkumar(senior pgmr)
|
|
|
|
|
Firstly, its NOT urgent.
Try writing a cookie and see if you get an error, and from that you should be able to deduce if its because cookies are disabled and display the message.
getramonweb wrote: when clicking "ok" button cookies should be enabled
Won't happen, you cannot do it from your code, hence your original problem.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
How is he a "Senior Programmer" or "senior pgmr" as he puts it?
hmmm pie
|
|
|
|
|
I am working on a from that contains these fields( email,subject and message) when i click the submit button i get this error, how can i solve it?
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\EasyPHP 2.0b1\www\mailform.php on line 10
Thank you for using our mail form
|
|
|
|
|
I suspect the answer is in the error message
Ahmad Hamid wrote: Failed to connect to mailserver at "localhost" port 25
sort of says it all.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
|
Ive written a function which works in Firefox but not in IE, in fact there are several things about this page that dont work in IE but this is the main one!!
I have a list view within a CMS that is displaying a list of pages within a web site. Part of the list is a status indicator (A graphic) which is either green, orange or red dependent on the current status of the page. Ive written an onclick Ajax function that alters the image and updates the DB stored status of the page. This is accomplished everytime the image is clicked - The icon is altered based on its current state, the function is called which creates an Ajax object, passes the current state and the id of the page to a PHP script which updates the mysql database. NOTHING IS RETURNED FROM THE PHP SCRIPT.
The code for this is as follows:
//PHP function call
showStatus($myRow['id'], $myRow['status'], $userID);
PHP function definition
function showStatus($id, $status, $editor)
{
if ($status == "1")
print "";
if ($status == "5")
print "";
if ($status == "9")
print "";
}
function getStatus(id, editor)
{
createObject();
if (XMLHttpRequestObject)
{
var url = "/cms/functions/ajax/getStatus.php?id=" +id;
XMLHttpRequestObject.open("GET", url, true);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200)
{
var result = XMLHttpRequestObject.responseText;
changeStatus(id, result, editor);
}
}
XMLHttpRequestObject.send(null);
}
}
function changeStatus(id, currentStatus, editor)
{
createObject();
if (XMLHttpRequestObject)
{
var icon = document.getElementById("statusIcon"+id);
var url = "/cms/functions/ajax/statusUpdater.php?id=" +id+"&editor=" +editor+ "&curState=" +currentStatus;
XMLHttpRequestObject.open("GET", url, true);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200)
{
var result = XMLHttpRequestObject.responseText;
if (currentStatus == 1)
{
icon.src = "images/system/paused.gif";
}
if (currentStatus == 5)
{
icon.src = "images/system/stopped.gif";
}
if (currentStatus == 9)
{
icon.src = "images/system/active.gif";
}
}
}
XMLHttpRequestObject.send(null);
}
}
AND FINALLY
// The php mysql update
include "../../_sql/config.php";
include "../../_sql/connect.php";
$table = "structure";
$id = $_GET['id'];
$curState = $_GET['curState'];
$editor = $_GET['editor'];
if ($curState == "1")
$nextState = "5";
if ($curState == "5")
$nextState = "9";
if ($curState == "9")
$nextState = "1";
$sql = "UPDATE $table SET status = '$nextState', dateEdited = CURRENT_TIMESTAMP, editedBy = '$editor' WHERE id ='$id'";
$doit = mysql_query($sql);
I have a feeling this is because nothing is being returned by the AJAX function because Firefox javascript console is telling me that no element is found however I dont know how to correct this.
Any ideas? Sorry about the length of this post
|
|
|
|
|
I suggest using JQuery[^] as it's functionality is compatible in all(most) browsers as far as I know.
Then you may want to use the Ajax Post Method[^] as I find it easier.
hmmm pie
|
|
|
|
|
I have a regular expression to strip out all the html tags except tag the regular expression is:
<\S[^><]*[^p\s]>
The problem with the expression is it strips out all the tag except but needs a space if there is any attributes inside.
It works fine for <p attributes="asdf" >
but doesnot work for
<p attributes="asfd">
What may be the problem.
Further i need to add tag as well so that the regular expression strips out all the html tag but not and
Thanks in advance
modified on Tuesday, March 17, 2009 8:06 AM
|
|
|
|
|
Hi Friends,
IIS 5.1 SMTP virtual Server doesn't show in inetmgr I am using win XP. Admin login "IIS 5.1 SMTP virtual Server" showed but doesn't shown in user login what i do..
plz help me..
|
|
|
|
|
Member 4482742 wrote: showed but doesn't shown
what is your question? it shows or it does not show?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Friends,
How to come in google's first page in my website.. anybody known help me...
|
|
|
|
|
Do you want to be the first item in the result list?
Two options:
Option One: Easy but expensive - give Google money so that you will be inserted as an advertiser
Option Two: Difficult and expensive - build a website everbody knows and love
Was this your question?
Regards
Sebastian
|
|
|
|
|
Hi thanks for your information, but my office no need to spend money for this one but improment google page rate what i do.. this is my milestone..
|
|
|
|
|
|
Hi,
Thanks for your valiable information and links.. I will try...
|
|
|
|
|
Is it possible to create a flash control that would allow you to drag and drop files and folders from the computer into the browser for purposes of uploading the files and folders (structure intact) to a server?
I just need to know if we can capture the data/events on the client and how we would do that.
Thanks for any input!
Jason
|
|
|
|
|
Hi everyone,
Im hoping someone can help me out here before I have a nervous breakdown...
Im trying to create a dynamic array of items which have been passed through from a php form. The script is designed to check that each of the form fields have been completed, return an error message if they havent and then enter them in to an array. The array is to then be passed to another PHP script for other things to be done to it.
The part Im stuck on is the creation of the array key. This needs to be done in a way that allows me to add the form field name as the key and the value of the form field as the array value so something like: "array[firstname] = Bryant;"
At the moment I have this all being done in the middle of a for loop which is iterating through the form fields to see if they have been completed. The code for this is below.
function submitForm(form, messageDiv, action)
{
var targetDiv = document.getElementById(messageDiv);
var inputs = document.forms[form].getElementsByTagName("input");
var selects = document.forms[form].getElementsByTagName("select");
var fieldName = document.getElementsByTagName("label");
var length = selects.length + inputs.length;
var data = new Array();
for(i=0; i < length; i++)
{
if (inputs[i])
{
if (inputs[i].value == "")
{
targetDiv.innerHTML = inputs[i].name+" is missing";
var error = 1;
return;
}
else
{
var error = 0;
var field = inputs[i].name;
var value = inputs[i].value;
data[field] = value;
}
}
if (selects[i])
{
if (selects[i].value == "")
{
targetDiv.innerHTML = selects[i].name+" is missing";
var error = 1;
return;
}
else
{
var error = 0;
var field = selects[i].name;
var value = selects[i].value;
data[field] = value;
}
}
}
if (error == 0)
{
targetDiv.innerHTML = "";
saveForm(form, messageDiv, data);
}
}
I've managed to half do this by using a numerical value for the key but I really need to have the form field name as the key so that I can associate the form field with the data when I pass it to the php script. Having said that when I use numeric keys on the second half is completed (the selects) becuause the inputs are all over written because the array key isnt incremented until the next iteration of the for loop.
I would really apprciate some guidance on this, Im kinda new to JavaScript!!
Cheers y'all
Bryant May
|
|
|
|
|
I wrote this on the fly.
function checkForm(formID)
{
var data = new Array();
var form = document.getElementById(formID);
for (var i = 0; i < form.elements.length; i++)
{
if(form.elements[i].value != "")
data[form.elements[i].name] = form.elements[i].value;
else
return 0;
}
return data;
}
It "should" work for both input and select which will save you the hastle of doing each seperatly
hmmm pie
|
|
|
|
|
Hi there - cheers for getting back to me. The form checking that you provided is awesome, and much quicker than the way I was going to be doing it!!!
Unfortunately the array bit doesnt work. Im returning the 'data' array to another function and when I try to alert the contents it comes up with nothing.....no matter how I try to get at the content. Presumably the array should contain my seven form field values along with the relevant field name keys but I cant get at any of it.
No errors are thrown and eveything looks like it should be working.
Any ideas?
Again, cheers for getting back to me so quickly! 
|
|
|
|
|
alert(data) will not work, but alert(data['anExampleFieldName']) will.
If you try and go through the array using indexing then it won't work either
Edit: Have you tried using the Firefox[^] Add-on called Firebug[^] which has a very useful JavaScript debugger.
hmmm pie
modified on Tuesday, March 17, 2009 12:07 PM
|
|
|
|
|
Alternativley if you want to use indexing then you can use a 2d array.
var data = new Array()
for (var i = 0; i < LENGTH; i++)
{
if(notEmpty)
{
data[i] = new Array(2);
data[i][0] = name;
data[i][1] = value;
}
}
That will be able to use indexing, although the structure is not what you previously asked for.
hmmm pie
|
|
|
|
|
Hi Friends,
I am using IIS Server with ASP, my mail code doesn't work whenever i send a mail it will go only Queue's folder it will not deliver.., but this code work well in my friend PC.
my OS Windows XP
Here My code
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="dmanivelan@siminfosystems.com"
myMail.To="dmanivelan@siminfosystems.com"
myMail.Bcc="dmanivelan@siminfosystems.com"
myMail.Cc="dmanivelan@siminfosystems.com"
myMail.TextBody="Testing." & Time
myMail.Send
set myMail=nothing
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
Please Reply immediately...
modified on Monday, March 16, 2009 11:07 AM
|
|
|
|