Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Shmooter #1
Execute code on page load
I can code that I want to execute on page load (code includes asp insert data
into tables) DWMX behaviours insert on submit. Can anyone put me on the right
track to executing the asp code on a page before the page loads so I dont have
to use a submit button?
Shmooter Guest
-
error, mapping htm files execute cfm code
Hello, I followed this technote to configure the web server so he can execute coldfusion code in htm files :... -
Execute code on session end
I would like to pop up a message to the user when the session is about to time out. And if they don?t respond I would like to update a database just... -
User control code behind does not execute
Anybody have any ideas as to why my user control code will not execute the server side code? I converted an .aspx page to an .ascx user control. ... -
execute javascript from php code
How can I execute a javascript file(test.js) from within PHP. I'm running oscommerce and want to insert a menu created in javascript by Sothink... -
How can I execute code stored in variable
> Something like ***execute()***, but instead of executing shell oops! By execute() I meant exec() or passthru(). It was very late when I... -
Brandon Taylor #2
Re: Execute code on page load
<%
'cn represents your connection object
cn.execute "insert into Table(ColName1,ColName2) values(Val1,Val2)"
%>
<html>
</html>
Just place a code block with the script you want to execute at the top of
the page and it will be executed first. The built-in behaviors are nice, but
they're not very flexible. The execute method can be used to fire your SQL
in one line. Check out [url]www.asp101.com[/url] for some basic tutorials. Learning to
write ASP, and just about any other scsripting language isn't all that hard.
The sooner you get started, the more powerful and flexible your applications
will be.
However, something you might want to consider is jumping in to ASP.NET,
since classic ASP is being replaced. In an ASP.NET example you would use a
DataAdapter to fire your SQL statement in the Page_Load sub...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
do SQL here
End Sub
HTH,
Brandon
"Shmooter" <webforumsuser@macromedia.com> wrote in message
news:d5p6k5$mtv$1@forums.macromedia.com...>I can code that I want to execute on page load (code includes asp insert
>data
> into tables) DWMX behaviours insert on submit. Can anyone put me on the
> right
> track to executing the asp code on a page before the page loads so I dont
> have
> to use a submit button?
>
Brandon Taylor Guest
-
Julian Roberts #3
Re: Execute code on page load
You could use the Command behaviour.
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest
-
Shmooter #4
Re: Execute code on page load
How exactly who I use the Command Behaviour.....any texts or tuts as to how i can implement your suggestion?
Shmooter Guest
-
Julian Roberts #5
Re: Execute code on page load
Put the SQL into the Command behaviour, eg
insert into myTable (myField) values ('foo')
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest



Reply With Quote

