R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Page return problem
Last Post 11 Mar 2009 03:37 PM by svedire. 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
NaveedUser is Offline
Basic Member
Basic Member
Posts:102

--
06 Dec 2008 08:34 AM  
hi,

i am facing problem while returning back to my page from where i left.

here is the scenario. I have a search form which returns the html and pdf files. When I click on html files it open the page, but when i click on Browser back button (IE only, firefox is working fine) sometime it jump to page before to the search form and skip the search form page, or some time it expires the page.

after two weeks of struggle i give up and decided to open the html and pdf pages in popup window to avoid this issue.

But now I want to know how to open the html's and pdf's in popup based on my below code.

here is the code in the listx which open the html file:

<a {ACTION,[ID],OpenHtmlFile,,Message} href="[*ApplicationPath]/Default.aspx">
{IIF,"[Html]=True","
<img id='tbiFilter' border=0 style='CURSOR: hand; CURSOR: pointer;' src='[PORTALPATH,System]/Images/ielogo.png'> ","
"}</a>

I didn't figure out how to use window.open() method to open the pages in popup.

one more thing I try simple url and it works fine, that means some thing wrong with my code above. I appreciate if someone point me to right direction for any scenario.

<a href="/mywebsite.com/Portals/[PortalID,System]/htmlFolder/F11995.htm">Link</a>

Thanks
ShalikshUser is Offline
New Member
New Member
Posts:31

--
08 Dec 2008 01:50 PM  
Try this,

<script type="text/javascript">
function open_win()
{
window.open("http://www.google.com","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=500, height=500");
}
</script>

<input type="button" value="Open Window" onclick="open_win()">

Hope this Helps

Shalik
R2Integrated
NaveedUser is Offline
Basic Member
Basic Member
Posts:102

--
08 Dec 2008 07:12 PM  
Thanks Shalik for your input. I already use the above method to open an custom popup window and it works fine for hard coded url but in my case I am having no success till now to use it with my action method mention below. i.e.

<a {ACTION,[ID],OpenHtmlFile,,Message}> LINK</a>

The above link open the html page out of 8000 pages depending on the Action ID from the data grid.

The main issue is how to incorporate the above with window.open() function.

thanks
NaveedUser is Offline
Basic Member
Basic Member
Posts:102

--
09 Dec 2008 10:57 PM  
Here is the reference from my Message Action Pane. hope to find any solution from you guys.

# Message:
Awaiting incoming message with Type 'OpenHtmlFile'.

# Execute Query[FETCH]:
Select * from [databaseowner,system][objectqualifier,system]TableName where ID = @OpenHtmlFile

# Source Path:
~/Portals/[PortalID,System]/Folder/[FileName,FETCH]. DestinationResponse Response.

Thanks
NaveedUser is Offline
Basic Member
Basic Member
Posts:102

--
12 Dec 2008 08:21 PM  
ping!!
svedireUser is Offline
Basic Member
Basic Member
Posts:128

--
11 Mar 2009 03:37 PM  
Hi,

If you are using an {ACTION,[ID],OpenHtmlFile,,Message}, then that means you are doing a postback (refreshing the page). If can modify your query to get the path of the file, then its lot easier to do it in an <a> tag. The <a> tag has an attribute called 'target' and if it is set to "_blank", you can open up your file in a new window.

So, your <a> tag looks like this <a href="your fiel path" target="_blank">LINK</a>

In case you don't want to change your query, then in your actions, replace source path with a redirect action with the file path that way you are redirected to this page after the postback.

#Message
Awaiting incoming message with Type 'OpenHtmlFile'.
## Execute Query[FETCH]:
Select * from [databaseowner,system][objectqualifier,system]TableName where ID = @OpenHtmlFile
## Redirect Action:
http://[ALIAS,SYSTEM]/Portals/[PortalID,System]/Folder/[FileName,FETCH].

## (child actions of message)

Hope this helps.

Thanks,
Sindura
R2integrated


You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share