|
Mate PHP and javascript are not compatible.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thank you for your sugessions.
I got the solution of that.
Thank you once again.
|
|
|
|
|
Hi!
I want to populate datagrid with static string object. I have populated datagrid dynamically by getting data from database, but in my application i want to populate it with data given in my string object,not getting data from data base.
|
|
|
|
|
I would create a dataset. Add a DataTable to it. Add whatever columns to the datatable.
Insert your static stuff into the datarows. Point the Datatable.DefaultView as the datasource for your datagrid. Hope that helps.
Ben
|
|
|
|
|
I have an java applet which required the JRE 1.5 to run, now i need to program in such way that, is user is running on lower version. the plugin for jre should be installed without downloding the JRE or JDK...
Can any body help ???????????????/
|
|
|
|
|
How else could it be installed without downloading the file?
|
|
|
|
|
ok well, heres a lil problem i'm comfronting.
i'm currently desgining a website, and this is what i have:
<form action = "#" method = "post" name = "message" onsubmit = "return formValidation()">
<input type = "text" name = "celPhone">
well ok, aside from all the javascript functions and stuff, i just want to know, is there any way possible for me to send the variable "celPhone" to a popup window that i have?
i did some debugging on the popup, window with:
$CELPHONE = $_POST["celPhone"];
echo $CELPHONE; -- doesn't work
echo $CELPHONE."<b>Is your number</b>"; -- doesn't work
echo $_POST["celPhone"]; -- didn't work either.
now here's the interesting part, i put on the html:
<form action = "sent.php" etc...>
all those codes work fine, but not on the popup.
anyone have any solution for me? any suggestions...??
it would be great,
thanks in advance!
The slowest components sits at the keyboard.
|
|
|
|
|
Ok the problem you are having is that onSubmit occurs before the form is actually submitted. Can you provide the code that you are using for the popup?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
ok, the code for the popup is simple, but before the popup, i have a couple functions executing for validation, here it goes:
<form name = "textMessage" onsubmit = "return formValidation(this)" method = "post">
etc...
function formValidation(thisForm)
{
with(thisForm)
{
var Phone = document.textMessage.celPhone
}
if(Phone.value == null || Phone.value == "")
{
this checks for the textboxt not to be empty
return false
}
if(emptyValidation(textMessage, "The field is empty")== false)
{
checks for this text box not to be emtpy neither
return false
}
// If these past conditions don't execute, then it wil go into
// this next function
sentConfirmationPopUP();
}
function sentConfirmationPopUP()
{
window.open("sent.php", "sent_window", "location = no, status = no, width=200,height=200, menubar = no");
}
that would be the code for my popup.
on the sent.php page, code would be:
$CELPHONE = $_POST['celPhone'];
echo $CELPHONE;
or
echo $_POST['celPhone'];
or even
echo "<b>".$CELPHONE."</b>";
nothing seems to work on that popup page, but like i mentioned before, if keep it on the same page, (action = "sent.php") then, it works, but i need it to work on that popup.
The slowest component sits at the keyboard.
|
|
|
|
|
The javascript is simply opening the popup window and telling to browser to request sent.php. The browser then sends a fresh GET request to the server for that page. Since its not POSTing to the page, none of the inputs will be available. The action attribute of the form element tells the browser to send a POST request to that URL with all the inputs values, which as you found out works OK.
The only thing I can think of off the top of my head is to set the target="_blank" attribute on the form to open it in a new window (BUT i'm not sure if this is a valid attribute of a form element? I suspect not, you'd have to check)
|
|
|
|
|
This is an ASP question, I hope this is the correct forum as I could not see an ASP only one.
I am working with dates in URLEndcode and have a date formatted 28/02/2007. When I URLEncode this on any of my in-house test servers no matter what locale (US / UK) LCID 2057(UK) / 1033(US) / 2048(opsys def) I have the / translated as a %2F Perfect.
On my hosted MS server (in Germany, defauly LCID = 1031). I get %2E.
This translates my date to 28.02.2007. The German way of handling dates.
I have Session.LCID = 2057 on each page but it makes no difference. it always encodes to %2E.
I have no control panel access to the server, is there anyway in my code I can effect the way Session.URLEndcode functions?
Thanks in Advance
Nigel.
|
|
|
|
|
This has nothing at all to do with UrlEncode. It only has to do with how you convert the date into a string. UrlEncode doesn't change depending on the culture, it always encodes the string the same way.
UrlEncode doesn't encode a date, it only encodes strings. If you are trying to encode a date, it will implicitly be formatted into a string before it's sent to the UrlEncode method.
---
single minded; short sighted; long gone;
|
|
|
|
|
That's understood Guffa, my question was arrising from on 3 servers I passed in a string 28/02/2007 (not using a date funtion) so I could control the input.
On 3 boxes the output is 28%0F02%0F2007 on the 1 hosted server in Germany I get 28%0E02%0E2007
The result of the %0E is that the string received at the other end is 28.02.2007 not 28/02/2007..
Nigel.
|
|
|
|
|
The characters "/" and "." would be URL-encoded into %2F and %2E, not %0F and %0E. Can you show the real output from the servers? If you just fake the output there is no point in showing it at all.
Also it would help if you show the code that produced the output.
If what you are saying is really true, then the script engine is badly broken, as the UrlEncode method is incapable of correctly encoding a string.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffy,
Sorry the %0E was a mistake is it %2E
This is my Code
---
response.write "<p><A HREF=info.asp?date="& Server.URLEncode(dToday) & " CLASS='EVENT' TARGET='rightframe'> =================<br>Load Monthly View<br>=================<br> </A>"
response.write "dtoday unencoded = " & dToday
response.write "date encoding = " & Server.URLEncode(dToday)
----
This is the output copied directly from the webserver
dtoday unencoded = 28/02/2007
date encoding = 28%2E02%2E2007
As you can see very odd!
Regards
Nigel...
|
|
|
|
|
Yes, that seems impossible.
Where do you set the value of the dToday variable?
---
single minded; short sighted; long gone;
|
|
|
|
|
This is the output from the webpage. Also when I place my mouse over the link on the site IE show this as what going to be processed.
dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
I have this gives the 28/02/2007 I have also hard coded this for a test. Same Result...
I have the identical code runnnin on my local SQL Server and it gives the correct Value %2F (That's UK locale) I even try changing my LCID on my local machine, and I cannot break it..... Changing LCID on the hosted server just changes the format of the date, but not the encoded value.
The only difference is that this is a hosted server in Germany.... I've emailed the ISP but they generally don't get involved in coding issues, however I think this is something wrong, as / should always convert to %2F.
-- modified at 14:52 Sunday 18th February, 2007
|
|
|
|
|
Nigel K Williams wrote: dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
So dToday is a date variable, not a string; thus the German server, when urlencoding it, will convert it to, for eg, 28.02.2007 irrespective of how you have formatted it.
Fred
|
|
|
|
|
I would agree with that however, if I put a line just above the encoding saying dToday = "28/02/2007" It still gives me 28%2E02%2E2007.
That's what's confusing me.
Nigel.
|
|
|
|
|
Is your original line with the CDate() still in there though, even if before this? Try deleting it (or REM'ing it out) and see if that helps...
Fred
|
|
|
|
|
Fred,
If I manually pass in a string (for testing) then the CDate is not taking effect and the problem still happens... I've worked around this with a character replace on the receiving end to convert the date back to what I want, so It's not a real problem. It's just stupid things like this niggle me.
|
|
|
|
|
Hi,
Try this using Dateserial(yyyy,mm,dd). This may solve your problem
Regards,
Manowj
|
|
|
|
|
Hello Everyone,
I am trying to disable horizontal scroll but keep vertical. I am sure I did this a couple years ago with javascript but cant remember how. Would be greatful if anyone could help.
thanks
Nicky
|
|
|
|
|
This should do it:
[CSS]
<style type="text/css">
<!--
html, body{
overflow-x:hidden;
}
-->
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Hi,
Can anyone give me some pointers on the best way of setting up a mirror website? (On Windows platform.) Tried Google but maybe I'm not asking the right question...
cheers
Fred
|
|
|
|