Link to home
Start Free TrialLog in
Avatar of myerit
myerit

asked on

Open a new window using the CFInput type="button"

I have looked everywhere for this and I can't seem to find it.  I need a button in a coldfusion flash form to open a new window.  I have found an example but I cannot make it work.  I am not sure if it is because I am using CF7.

<cfinput type="button" name="FMMapOneView" value="View" onclick="window.location.assign('FMMapOneView.cfm');">

I can't seem to get this to work.  The form actualy stops loading with this example.
ASKER CERTIFIED SOLUTION
Avatar of mrichmon
mrichmon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pinaldave
Repeating what mrichmon said.
1) cfform and cfintput re-writes its own javascript so you can not use onclick on onblur events.
2) regular html is much more powerful and can do all the validation what cfinput or cfform can do also you can use the javascripts. as mentioned in the previous comment.
Regards,
---Pinal
Avatar of myerit
myerit

ASKER

I was not able to get  mrichmon's example to work.

I have it opening in a new window now using this:

 onclick="getURL('FMMapOne.pdf', '_blank', 'POST');">

I am wondering if there is a way to show some window dimensions as with javascript.  Can you tell the window not to be resizable with the method I am using?
what is your getURL function is ?
May be Javascript Topic Area experts will be helpful to you.
Avatar of myerit

ASKER

onclick="getURL('FMMapOne.pdf', '_blank', 'POST');">

This is a typo^

It should read:
onclick="getURL('FMMapOne.cfm', '_blank', 'POST');">
Avatar of myerit

ASKER

hmm that may be a possibility thanks I will try that
What is not working?
Avatar of myerit

ASKER

I cannot get you example to work.  The form does not load at all on the screen when I try your example.  I have tried stripping is down to just onclick="window.open()" and it still will not load the form.  I am using CFINPUT, with flash forms by the way.  I saw that your example showed INPUT.  
onclick="window.open()"

will not work - you need to specify what to open.

Yes my example showed input NOT cfinput because as I said you cannot set the onClick for cfinput.

Pinaldave also verified this.  Cold Fusion overwrites what you have.

So you either need to use regular input or have a link that uses onclick.  Basically NOT a cfinput.
Agreed with Mrichmon 100%. Again just "echo" of what he mentioned.

Besides if you are using flash forms with CF7. You can sure not use any of the javascript event at all. It is way different than the regular forms.
Regards,
--Pinal
To expand on pinaldave's last comment

I beleive with Flash Forms you use actionscript in place of javascript
Avatar of myerit

ASKER

ok