|
LOL - g'day, John. I didn't spot that it was you.
The easiest way to handle this sort of thing is to add a validator on the page, you can create a custom validator that runs your jscript, and then if the page is not valid, the validator will show, instead of the page posting back.
Oh, to answer your original question, you can't. You'll need to write javascript to show the dialog, and to respond to it. If you're just redirecting to a different page based on the response, you can do that entirely in javascript, and just use an HTML input button, set it's click event to call your method.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
John Simmons / outlaw programmer wrote: f***, I don't know - I'm a c++ programmer - I usually get to deal with REAL user interfaces instead of this 10-pounds-of-crap-stuffed-int-a-five-pound-sack-pseudo-interaction kinda idiocy...
With a "real" user interface, you mean a simple client program? I can understand that it's hard to get the hang of how things work when you move on to the more complex client-server model.
The user interface of a client program is so easy. Everything has state, is always available, and everything handles itself. You don't even have to think to program...
---
single minded; short sighted; long gone;
|
|
|
|
|
After years of writing client software, I found it tough when I started on web apps. So many questions on these forums show that a lot of people ( and I'm not suggesting John is one ) have no idea of what a web app does, in terms of client and server.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Mate if you are a C++ programmer what are you doing with that ASP.net c***. With no offense intended to anyone using the language, it is stupid. PHP (or even a CGI script) means you can actually see what is going on. If you need a bit of help getting started I'll be happy to give you guidance, but within a few months (read days) you will be able to take full advantage of the language. Just email me if you need a hand.
(and now to cover my ass)
ASP.net is very useful if that is the language you have come into web development with. It is certainly unique and a clever way to implement a language .
|
|
|
|
|
John Simmons / outlaw programmer wrote: <asp:Button ID="btnRefresh" runat="server" removed="btnRefresh_Click" Text="Refresh" UseSubmitBehavior="False"/>
Add a client side onclick handler (server side attribute is OnClientClick, the forum changed it to 'removed'):
<asp:Button ID="btnRefresh" runat="server" removed="btnRefresh_Click" Text="Refresh" UseSubmitBehavior="False" OnClientClick="return confirm('Refreshing. Continue?');" />
If the user hits no the confirm function will return false and the button click will be cancelled client-side. Of course if your doing something important in // blah blah blah that might not work (no postback).
You might also want to look at the RegisterClientScriptBlock function rather than using Response.Write
|
|
|
|
|
Hi,
I wrote an article about this.
Check it out here..
Custom Javascript Dialog
http://michaelsync.net/2007/01/01/custom-javascript-dialog/
There is one button and a datagrid in that page. If you click "Delete" button then Javascript Popup will be shown. There are two buttons "Delete" and "Cancel" on that popup. If you click "Delete" btn on popup then the records from datagrid will be deleted. you can also cancel by clicking "Cancel" button..
Hope it would help.. Let me know if you have any problem with my article.
|
|
|
|
|
Hi,
I want to learn CGI programming. I just need some newbie guidance.
I am using Windows XP Professional, and have installed Apache
successfully.
Can someone please guide me regarding what else do I need to do
to get started with CGI? I've heard that any language can be used
for CGI programming. (C, C++ etc.)
I have downloaded Python and Perl. Can these be used for CGI
programming? and how can I integrate them with Apache for doing
CGI programming? I'm planning to use python, because almost everyone
has told me it's a simple language.
Some light on Apache, CGI, Python and integrating them would be
helpful.
Thanks in advance.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
I believe that I'm not getting responses because we are supposed to discuss only Microsoft
Technologies here and not open source.
If that's the case, then I guess I'll have to ask elsewhere.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Mate PHP is a much better way to start of with web languages. If you need guidance in it just send me an email.
|
|
|
|
|
But I've been told that raw CGI with C (or python for that matter) can be
180% percent faster than PHP, and near about 350% faster than ASP.
Then why should I learn PHP just for the sake of programming simplicity?
I agree it's an easy way, but end clients wouldn't care whether it's PHP
or Ruby on Rails doing the work.
For them, it's about speed and reliability. And regarding the aspect of
difficulty: The term 'easy/better language' is bs, if you'll excuse the
expression.
Any language is easy as long as you are playing with ints and designing
nice games of tic-tac-toe. When you want full fledged concurrency control
techniques to handle a pool of persitent connections, or low level control
and deep operating system hooks, it will get complex in any language. Anyone
who argues with that is a moron.
So I might as well start with something which can scale up to millions of
documents and provide blazing fast performance, fast enough to leave ASP, PHP
JSP and the likes eating dust.
Peace.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
The stats you have seen are rubbish. As of PHP 5 it can run just as fast 95% of the time. An example of it in use is Google and YouTube and Flickr, The last two in particular are an excellent example of extremely high load applications in the language.
Not to mention I can code an application in PHP within 200 lines that would take over a thousand in CGI languages. PHP is optimized for power as a server side application, and it's customization allows you to write your own functions that are compiled into the core compiler with little more then 50 lines.
PHP is certainly a major player in the web and is widely accepted for it's incredibly speed and reliability.
|
|
|
|
|
Hi all,
I have a drop down menu that's written in JS. It's working on IE7, Opera, and FireFox. But when i test it on IE6 i found that it's not working. i don't know why. there's no error occured, it just disabled. I checked security settings and aslo JS in enabled but i don't know why it doesn't work
Here is the JS
sfHover = function()
{
if (document.all && document.getElementById)
{
sfEls = document.getElementById("nav");
for (i=0; i < sfEls.childNodes.length; i++)
{
node = sfEls.childNodes[i];
if (node.nodeName=="LI")
{
node.onmouseover=function()
{
this.className+=" over";
this.getElementsByTagName("UL")[0].style.visibility="visible"
}
node.onmouseout=function()
{
this.className=this.className.replace(" over", "");
this.getElementsByTagName("UL")[0].style.visibility="hidden"
}
}
}
}
} window.onload=sfHover;
|
|
|
|
|
I'm trying to get my wordpress working right. I want to add the Search function, and maybe a Categories function if possible. I was told code_frog or Christian could help me, cause the dabble in WordPress??
http://blogs.wickedorange.com/andrew/
Heres the code which works:
<div id="header"></div>
<div id="container">
<ul id="nav">
<li<?php if (is_home()) echo " id=\"current\""; ?>><a href="<?php echo get_settings('home'); ?>" title="home"><span>home</span></a></li>
Here's the code i added, which doesn't work...
<li>
<a href="?paged_id=110">
<span>
.NET Search
</span>
</a>
</li>
</ul>
</ul><br/>
www.wickedorange.com
|
|
|
|
|
AndrewVos wrote: Here's the code i added, which doesn't work...
What do you mean? What happens when you use that bit of code?
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Well, the .NET Search button doesn't show as selected when on that page.
How would I do an If url = someurl in php?
Also, what is the link for the search page in wordpress?
www.wickedorange.com
|
|
|
|
|
When I need to do php stuff inside html, I build the string and then echo it.
<?php
$strHtml = "<div id=\"header\"></div>";
$strHtml .= "<div id=\"container\">";
$strHtml .= "<ul id=\"nav\">";
$strHtml .= "<li ";
if (is_home())
{
$strHtml .= "id=\"current\"";
}
$strHtml .= ">"
$strHtml .= get_settings('home');
$strHtml .= " title=\"home\">home</a>";
$strHtml .= "</li>";
$strHtml .= "<li>";
$strHtml .= "<a href=\"?paged_id=110\">.NET Search</a>";
$strHtml .= "</li>";
$strHtml .= "</ul>";
$strHtml .= "</div>";
echo $strHtml;
?>
You also have an extra /ul and were missing a /div...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Just to be the little nit picker I am, echo'ing text takes 1/4 more time then leaving it outside of PHP tags. Usefull fact when printing over 1,000,000 records.
|
|
|
|
|
Hello, is there any way to change input type=file's browse button in my language
Thanks
Best Regards
|
|
|
|
|
I am affraid it's not possible - but I might be wrong so if someone knows some solution I'll be happy to know as well.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Perhaps the W3c has implemented a way to do this.... oh wait... they are incompetent.
|
|
|
|
|
hi!
i m developing EMail client in C# asp.net web application using kerio mail server.
I have sent and received emails using SMTP and POP3 dlls.But i dont know how to add new user of particular domain on my server using c#.
Plz reply soon
thanx
|
|
|
|
|
Please stop cross posting.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I am working on an expandable left-side menu using Javascript. It has three level. While it works fine in IE, the submenus could not be opened in Firefox. Anyone knows why??
The function I used to open the topTreeMenu is like:
function openTopTree(n)
{
var item_cel=document.getElementById('topTreeTable').cells[2*n+1];
if(item_cel.innerHTML=="")
{
closeTopTree();
treeImg[n].src="../images/redarrow3.png";
switch(n)
{
case 0 : {item_cel.innerHTML=item00_all;break;}
case 1 : {item_cel.innerHTML=item01_all;break;}
case 2 : {item_cel.innerHTML=item02_all;break;}
case 3 : {item_cel.innerHTML=item03_all;break;}
case 4 : {item_cel.innerHTML=item04_all;break;}
case 5 : {item_cel.innerHTML=item05_all;break;}
case 6 : {item_cel.innerHTML=item06_all;break;}
}
}
else
closeTopTree();
}
But in Firefox Javascript console, the browser says "document.getElementById('topTreeTable').cells[2*n+1] has no properties". Anyone knows why and how to fix it??
Thanks a lot!
Iris
|
|
|
|
|
To things:
1. please post the HTML for the table
2. Which line does it say the error is in?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
document.getElementbyId('topTreeTable') is returning a table element but cells is not a property of a table. You want rows and then you'd have to pull the cells out for each row. Use Firebug to see the properties of any DOM node on a page.
|
|
|
|