close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

select with "/" inside value wont get selected on page reload

Thread began 6/12/2019 6:38 am by SCar87011738 | Last modified 6/14/2019 11:12 am by Ray Borduin | 1000 views | 5 replies |

SCar87011738

select with "/" inside value wont get selected on page reload

Hello Ray,
I upgraded a page from DB1 to DB2.
It remains only a problem:
I have a form that contains a select. The select has these values:
ART 9812/A+ SF
ART 459/A+/NF/1
ART 9620 A+ NF

The form uses the persist data server behaviour, so, when page the reloads or server validation fails the previous selected item should get selected.
This is true on the same page in DB1.
But in DB2 the values contaning the character "/" won't get selected.
If you select the "ART 9620 A+ NF" it works correctly.
If you select the "ART 9812/A+ SF" or "ART 459/A+/NF/1" item, the menu will reset once page reloads.
If you select the "ART 9812/A+ SF" or "ART 459/A+/NF/1" item in DB1, the menu will select the previous item correctly.

Please consider I recreated the select menu from scratch in DB2 to be sure the code is right.

I think there is a problem in the comparison between the selected value and the persist data, in DB2.
Is there something to change to make this work?
TIA
tony

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page for me to review the code. If I could get a URL to reproduce and FTP access then I could debug it live and be sure that I get it fixed properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

SCar87011738

Hello Ray, I can only attach the files here.

Sign in to reply to this post

Ray BorduinWebAssist

Try changing:

php:
<?php if (!(strcmp($rs_modelli->getColumnVal("modello_prod"), (WA_getSavedFormValue("persist_data","prodotto_reg"))))) {echo "selected=\"selected\"";} ?>


to:

php:
<?php if (!(strcmp($rs_modelli->getColumnVal("modello_prod",false), (WA_getSavedFormValue("persist_data","prodotto_reg"))))) {echo "selected=\"selected\"";} ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

SCar87011738

Originally Said By: Ray Borduin
  Try changing:
php:
<?php if (!(strcmp($rs_modelli->getColumnVal("modello_prod"), (WA_getSavedFormValue("persist_data","prodotto_reg"))))) {echo "selected=\"selected\"";} ?>

to:
php:
<?php if (!(strcmp($rs_modelli->getColumnVal("modello_prod",false), (WA_getSavedFormValue("persist_data","prodotto_reg"))))) {echo "selected=\"selected\"";} ?>
  


Hello Ray,
this way it works.
Have I to add the "false" argument manually or there is a plan to include this in a future DB2 build?
TIA
tony

Sign in to reply to this post

Ray BorduinWebAssist

The MySQLi server behaviors have built in Cross Site Scripting protection that will encode characters that can be used maliciously on your site. You can disable it manually with the false argument where you need to.

You could disable it globally in your rsobj.php file, but that is not recommended since the Cross Site Scripting protection is good to maintain in most cases.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...