cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Web Page Reload

lwei
1-Visitor

Web Page Reload

Hi, developers!

     Is there anything that can reload the whole web page, just like clicking F5, but not using F5.

     Not the mashup reload function. Thanks!

Lee

ACCEPTED SOLUTION

Accepted Solutions
tcoufal
13-Aquamarine
(To:lwei)

Hi,

tricky thing

you can use a special mashup which contains a HTML text area set as "read only".

than you can create a thing which has one property type of HTML, put this inside

<A HREF="javascript:history.go(0)">Click to refresh the page</A>

than on that mashup find your thing, call get property values and bind your HTML property to that HTML text widget. Upon load link will be displayed upon click on that link whole page will be refreshed. Or you can set your HTML property to this:

<META HTTP-EQUIV="refresh" CONTENT="15">

than whole page will refresh as soon as your mashup displays that HTML text area widget with your property in..


You can test it and give me some feedback, I myself have not tested it.

Hope that helps a bit.  

 

View solution in original post

7 REPLIES 7
tcoufal
13-Aquamarine
(To:lwei)

Hi,

tricky thing

you can use a special mashup which contains a HTML text area set as "read only".

than you can create a thing which has one property type of HTML, put this inside

<A HREF="javascript:history.go(0)">Click to refresh the page</A>

than on that mashup find your thing, call get property values and bind your HTML property to that HTML text widget. Upon load link will be displayed upon click on that link whole page will be refreshed. Or you can set your HTML property to this:

<META HTTP-EQUIV="refresh" CONTENT="15">

than whole page will refresh as soon as your mashup displays that HTML text area widget with your property in..


You can test it and give me some feedback, I myself have not tested it.

Hope that helps a bit.  

 

tcoufal
13-Aquamarine
(To:tcoufal)

I can confirm,

it works quite nicely,

you can use that second statement make CONTENT="0" and put a button on that mashup a bind its clicked event to GetPropertyValues service (which result is bound to HTML Text widget set up as read only). Once button is clicked page refreshes immidiately.

Be careful though with that.

lwei
1-Visitor
(To:tcoufal)

Hi, Tomas!

     Thanks for your comment! I've tried out the method you said, but it still can't work.

1471582464824.jpg

1471582451672.jpg

1471582496001.jpg

I followed the steps as you said, but it still can't refresh the page.

Is there anything that I missed?

Sincerely,

Lee

tcoufal
13-Aquamarine
(To:lwei)

I think your setting your property wrong.

You need to click on </> so you enter the TAG mode, otherwise is standard WYSIWYG, if you take a look at your property it says:

<p><META></p> and META tag cannot be placed in Paragraph tag.

Try it and let me know.

tcoufal
13-Aquamarine
(To:tcoufal)

yep and be careful, if you set anything in TAG mode and you switch back to normal mode (WYSIWYG) everything that you typed will be executed.

You if you place some javascript code that will run too. 

lwei
1-Visitor
(To:tcoufal)

Thank you, Tomas!!!!

It worked nicely, and this method can solve many of my problem, thanks a lot!!!

You save my day!

Lee

tcoufal
13-Aquamarine
(To:lwei)

Glad I could help,

you can do quite lot with it. I do recommend to set your HTML property in more profound way though. You can create separate files in your repository folder and load their's content via Respository services and fill your HTML property that way.

I have created a Flot graphs like this.

Tomas

Announcements


Top Tags