|
alexyxj wrote: Do you guys have any thoughts or suggestion
Yes. Show a little of what you have done. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks Guys, I've solved the problem, it's about the container width, which is a little bit smaller than the total width of its table cell. Firefox ignores this but IE doesn't, break the second table cell into two lines.
^_^ anyway, thanks for your time...
|
|
|
|
|
how to get posted data value in javascript during round trip
|
|
|
|
|
I am working on an app for a big company and we have a subdomain website page that is opened by javascript.
We want to have the opened page redirect the window.opener when it is closed. The big thing is that the opener is on a different subdomain (same top level domain). Will this be permitted or is blocked by browser 'cross-site scripting'?
I've tried a couple methods but can't seem to get it to redirect. Mainly trying
window.opener.location.href='blah.htm';
|
|
|
|
|
Try opening this page with javascript ...
<head>
<title>popup</title>
<body>
Close this window with the CloseMe button or with the browser control.
<FORM>
<INPUT type="button" value="CloseMe!" onClick="window.close()">
</FORM>
<script>
window.onbeforeunload=function(){window.opener.location.href="http://msn.com"}
</script>
</body>
</html>
|
|
|
|
|
Not sure whether it's called like this. But here's what I intend to do is:
I have an application that embeds mozilla's gecko to display html with support for css and javascript. Inside the html, there maybe some hyperlinks or forms that needs to dynamically generate new html content. Instead of sending a request to a remote server to handle the request. I want to handle the request within the application. So I have to embed a local server in the application to do the job. Is it right or there's a better way? Are there such code project or some references for this kind of design?
Many thanks~
|
|
|
|
|
|
ryanstd wrote: Inside the html, there maybe some hyperlinks or forms that needs to dynamically generate new html content.
Sounds like ASP, and you can re-use the ASP.NET runtime[^] to generate dynamic HTML. You don't even need a webserver to do so I are Troll
|
|
|
|
|
Hi!
How can I check the validation of the email by searching '@' character inside of document.getElementById('email').value
or does anybody have better idea?
|
|
|
|
|
I've come at this from a .NET approach so it'd just be a regular expression validator control with the expression:
"^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$"
There's quite a few at regexlib.com if that doesn't match what you want, judging by your original question, I'm assuming you might just be working solely in javascript in which case, same expression should work with the javascript regular expression object but it's not one I've used.
|
|
|
|
|
|
I recently got a new computer and am now running Windows 7, which I'm not very familiar with (previously on XP).
I have imported a couple of web applications from my old box but I am having problems accessing ASP pages. That's old fashioned ASP, not .NET. I constantly get Error 403.1 even though I have checked that all folders within my InetPub folder have execute access enabled.
Actually, not quite all. I have discovered that if I set up an ASP page at the top level then the following works:
http://LocalHost/Test.asp
but the same test page one level down fails:
http://LocalHost/BBL/Test.asp gives 403.1 error.
I have tried grovelling around in IIS manager but it's all changed since I last used it in anger. Under Sites I have "Default Web Site" and under that BBL as a web application. I have right clicked on BBL and chosen Edit Permissions... and all the listed users, including IUSR and IIS_IUSRS, have read and execute permissions checked. The underlying Windows directory also has execute permission. What have I missed here? How do I make the ASP pages within my application work correctly?
|
|
|
|
|
|
Dave
Thanks for your suggestion but the link in your posting just takes me back to the current thread. Is there something missing?
Keith
|
|
|
|
|
|
Thanks Dave
I right clicked the BBL folder in Windows explorer, chose properties then permissions and set Read/Execute access on for IIS_WPG as suggested and it still doesn't work. So I set Read/Execute access for Everyone and still it fails.
I tried setting permissions on the actual ASP file and most were greyed so I couldn't change them (but Read/Execute was already set). I added Everyone to the list of users and gave Everyone Read/Execute permission and still my ASP script won't run.
I am beginning to tear out what little hair I've got left. Is there some setting in IIS manager that I'm missing?
Keith
|
|
|
|
|
Hello,
How can I call internet explorer or any standard browser on system from my VC++ program.
I want to go to my Home page with a button click. So simple ! but I can't.
thankyou!
|
|
|
|
|
What have you tried? This would probably be better asked in the C++ forum I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The MSDN documentation[^] on Process.Start has a fine example of how to do this in VC++, although this launches a specified web page rather than your home page.
|
|
|
|
|
|
Hi there, I really hope you can help I have worked on this all day today and last night. I can't get the Total box to calculate. I am trying to create an online invoice for my customer to print from my web page. I have scoured the internet looking for some help, but it doesn't help that I am clueless about javascript. This is what I have tried: In my table, all I want to happen is for the user to type in a price in the Amount boxes and then have a total at the bottom. Seems pretty basic, but I just don't understand why it won't work (not really sure of what I am doing)
Can somebody please help me?
The form itself can be found at www.ahtcsonline.com/invoice.html - the source is too much to copy so it may be easier to view the form and then view the source code underneath it.
Thank you in advance,
Evan
<script type="text/javascript">
function totalamountdue(){
{
var amount, amount2, amount3, amount4, amount5, amount6, amount7, amount8, amount9, amount10;
Amount = document.Invamt.Amount.value;
Amount2 = document.Invamt.Amount2.value;
Amount3 = document.Invamt.Amount3.value;
Amount4 = document.Invamt.Amount4.value;
Amount5 = document.Invamt.Amount5.value;
Amount6 = document.Invamt.Amount6.value;
Amount7 = document.Invamt.Amount7.value;
Amount8 = document.Invamt.Amount8.value;
Amount9 = document.Invamt.Amount9.value;
Amount10 = document.Invamt.Amount10.value;
Total = document.Invamt.Total.value;
document.Invamt.Total.value = (amount + amount2 + amount3 + amount4 + amount5 + amount6 + amount7 + amount8 + amount9 + amount10);
}
}
</script>
|
|
|
|
|
Try this:
function totalamountdue(){
var Amount = document.getElementById("Amount").value;
var Amount2 = document.getElementById("Amount2").value;
var Amount3 = document.getElementById("Amount3").value;
var Amount4 = document.getElementById("Amount4").value;
var Amount5 = document.getElementById("Amount5").value;
var Amount6 = document.getElementById("Amount6").value;
var Amount7 = document.getElementById("Amount7").value;
var Amount8 = document.getElementById("Amount8").value;
var Amount9 = document.getElementById("Amount9").value;
var Amount10 = document.getElementById("Amount10").value;
document.getElementById("Total").value = amount + amount2 + amount3 + amount4 + amount5 + amount6 + amount7 + amount8 + amount9 + amount10;
}
We really should add some error handling and/or only allow numbers in the text boxes.
|
|
|
|
|
Hi There Jason, I wished it worked, I was really hoping but nothing calculated when I hit the "calculate" button. I want you to also know that I have tried so many iterations before I asked for help. I am very tenacious and still looked on the net after my submission. Wish I knew what I was doing but I truly think that the subject is over my head. Although I did create my website from scratch back in August and I knew nothing of HTML...not that I know that much now
Thank you for trying,
Evan
|
|
|
|
|
<pre>function totalamountdue() {
var inputs = document.getElementsByTagName("INPUT");
var runningTotal = 0;
for (i = 0; i &lt; inputs.length; i++) {
if (inputs[i].id == "total") {
inputs[i].value = runningTotal / 100;
var a = inputs[i].value.split(".");
if (!a[1]) {inputs[i].value += ".00"}
else if (a[1].indexOf("0") != 0 &amp;&amp; a[1] &lt; 10) { inputs[i].value += "0" }
}
if (inputs[i].id.indexOf("Amount") == 0) {
if (/^[1-9][0-9]{0,2}(,[0-9]{3})*(\.[0-9]{2})?$/.test(inputs[i].value)) {
runningTotal += +inputs[i].value * 100;
} else {
if (inputs[i].value == "THIS IS A BAD VALUE") { inputs[i].value = ""; }
if (inputs[i].value) { inputs[i].value = "THIS IS A BAD VALUE"; }
}
}
}
} <></pre>
-- Modified Friday, February 26, 2010 1:35 AM
|
|
|
|
|
Dave, I could hug you...or just give you five! Thank you and the previous person, Jason for all of your efforts. I hate to ask for help, but there was no way I was going to get this one. Sometimes I come up with these ambitious ideas but with no way to implement them.
Thank you very much,
Evan Einhorn
|
|
|
|