Forum Discussion
MCFNeil
8 years agoQrew Captain
Sorry for the confusion.
Your current href is designed to refresh the page, correct? (window.location .... void)
you will replace all of that with the simple href="'& $URL &'" target='_blank'
So it will preform your edit, but then open the rdr in a new tab.
"<a class=\"Vibrant Primary\"
href='" & $url & "&rdr=" & URLEncode($rdr) & "' target='_blank'
>Receive Exchange</a>
Your current href is designed to refresh the page, correct? (window.location .... void)
you will replace all of that with the simple href="'& $URL &'" target='_blank'
So it will preform your edit, but then open the rdr in a new tab.
"<a class=\"Vibrant Primary\"
href='" & $url & "&rdr=" & URLEncode($rdr) & "' target='_blank'
>Receive Exchange</a>
- AndreonnaGarret8 years agoQrew Assistant CaptainThis works! Is there a way to get it to also save the parent record? When I clicked it opened a new tab, but left the original page as is unsaved.
- MCFNeil8 years agoQrew CaptainFor that you will want to use the 'linkaway' href call.
This is straight out of a template application:
"<a class='Vibrant Success' href='javascript:LinkAway(\"" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=success.html" & "\");' >Submit and redirect</a>"
// This works because you have turned on the table's advance settings, "Save parent record automatically when a child record is created."
yours will look like
href='javascript:LinkAway(\"" &$url & "&rdr=" & URLEncode($rdr) & "\");' target='_blank' - MCFNeil8 years agoQrew Captainnow that I'm thinking about it, that might not work....
The javascipt and the target might fight each other....
I've never had to do it this way and the syntax is probably wrong... - MCFNeil8 years agoQrew CaptainOh i see the issue with this now. You are actually performing an edit of the record you are on. So if you try to save, and edit and rdr, that might cause some issues. (especially with overriding data)
What is the problem you are trying to solve for. That might help with a more focused approach. - AndreonnaGarret8 years agoQrew Assistant CaptainI'll tell the full story lol
So when we sell some parts, we require the customer to send us back the bad part as an exchange. This button is in a report for the line items on a PO. So when pressed it will refresh that page (which is actually the PO) to show that the exchange was received, and simultaneously open a new tab that will allow us to enter that new part into inventory.
The idea is to streamline the process a little bit.
Thanks! - AndreonnaGarret8 years agoQrew Assistant CaptainI think maybe I just need it to also refresh the original page.