delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

<form action="Action.cfm" method="post">
<input type="submit" class="formButtons" name="EventView_Edit" value="Delete">
</form>
It was working fine when I had this secrions operators on it's own page, but now that I am narrowing it down with a lot of code for a number of items, it is missing the delete function because the name of the form button is not passing through the java.
How do I fix this?
Also, is there a better way of doing what I am doing? Or is this pretty much it?
Thank you.
Codemonger


Hello;
How is everyone?
I am upgrading a lot of my code to cf 8, a lot of it was running on old code. I made a lot of serious changes and I ran into a problem in doing things this way.
Here is what I am trying to do.
I have an app that has a number of different pages doing a number of different things, adding records, inserting new ones an so on. I made 1 page called action.cfm this page has all my controls on it for all these sections of the app. To set off the appropriate code, I am using an if statement like this:
<cfif isDefined("Form.EventView_Edit")>
and it sets off the code for that form. the submit button on the form is called: EventView_Edit
Now, I am trying to pass this information through a java script I use to ask you if you really want to delete a record.
This is that script:
<script language="JavaScript">
function confirmDelete(ID_Field,ViewField1) {
if (confirm ("Are you sure you want to delete " + ViewField1 + " event?"))
{
document.HREF.action="ProjectCat-Action.cfm?id="+id;
document.HREF.submit();
}
return false;
}
</script>
This is parts of the form, passing the info.
<form action="Action.cfm" method="post">
<input type="submit" class="formButtons" name="EventView_Edit" value="Delete">
</form>
It was working fine when I had this secrions operators on it's own page, but now that I am narrowing it down with a lot of code for a number of items, it is missing the delete function because the name of the form button is not passing through the java.
How do I fix this?
Also, is there a better way of doing what I am doing? Or is this pretty much it?
Thank you.
Codemonger

TOP


Originally Posted by kiteless
I don't follow what you asking. What do you mean the "name of the form button isn't passed through the Java?" (I assume you mean JavaScript?)  How could it be passed, all the function takes is the field name and the record id. If you want the name of the form button, you'll have to pass it as an argument to the function.
Exactly, how would I pass that info through the java script? I am at a loss on this. Don't know how I would write that into my code.
Can you help me?
CFmonger



<form action="Action.cfm" method="post">
<input type="submit" class="formButtons" name="EventView_Edit" value="Delete">
</form>
It was working fine when I had this secrions operators on it's own page, but now that I am narrowing it down with a lot of code for a number of items, it is missing the delete function because the name of the form button is not passing through the java.
How do I fix this?
Also, is there a better way of doing what I am doing? Or is this pretty much it?
Thank you.
Codemonger

TOP

Back Forum