RSP

Posted: 2017-01-22 in RSP

Q:
I’ve a table,, witha a memo field.
In the grid section, I write:
Bianco,Rosso,Rosè,Nero

If I test the field (? myField), I get:

Code:


p, li { white-space: pre-wrap; }

Bianco,Rosso,Rosè,Nero

Is possible to use standard memo field without all the HTML?
Or..
Is possible to remove all the HTML?
A:
Memo fields are rich text formatted. If an attribute was provided for this you would need to make sure you always stored plain text in the memo everywhere. That’s messy with web and mobile.


 

Code:
<%    
// test.sn

proc drawTable()
    laFields = explode(",", m_fields)
    laCaption = explode(",", m_caption)
    laQuery = explode(",", m_query)

    ? ('') 

    ? ('')
    
    ? ('')
    ? ('')   

    ? ('')
    for lnI = 1 to alen(laFields)
  lsQueryValue = ""
  if !empty(m_query)
   laQueryValue = explode("|", m_query)
   lsQueryValue = laQueryValue(2)   
  endif
  
  ? ''   
    endfor

    ? ('

' + m_query + '

') ? ('') ? ('') ? ('') ? ('') lnRiga = 1 scan if mod(lnRiga, 2) = 1 rowcolor = "#f1f6fe" altcolor = "#FFFFFF" else rowcolor = "#FFFFFF" altcolor = "#f1f6fe" endif lnRiga = lnRiga + 1 ? ('') for lnI = 1 to alen(laFields) ? ('') endfor ? ('') endscan ? ('
') ? ('
' ? '' ? '
') if laFields(lnI) = m_target lsField = &laFields(lnI) ? [<a href="javascript:selectitem('&lsField')">] + &laFields(lnI) + [] else ? (&laFields(lnI)) endif ? ('
') endproc drawTable() %>

Then I’ve a Javascript Commandbutton.
Is possible to refresh the page from Javascript? As a recall the drawTable() function..
A:
Reference the section and change the URL adding arguments.
You should read the arguments using getParameter() and use these to determine what data is displayed. Seeing that this is a desktop Webview with no cloud server you can’t use Ajax, just change the URL
and issue a refresh. You can have a procedure that you call that does all this.
I notice your HTML is wrong.

Code:
border="0px"

(needs to be in quotation marks)


Q:
How I can enable cache browser using .rsp.
Today the generated page have the modified date is 07/27/1997 02:00.
I need set to datetime()
I already try use meta tags and dont work.
I change the http settings to enable cache and dont work, too!
A:
.rsp pages are compiled dynamically if the source file is newer than the .rso object file. That’s how all dynamically generated pages work.
These pages are not cached in the browser, they are cached on the server.
Caching only affects static content such as images, JavaScript files and CSS files.



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s