Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   question about php, or javascript stuff (https://thetfp.com/tfp/tilted-technology/2849-question-about-php-javascript-stuff.html)

delight 04-25-2003 07:03 PM

question about php, or javascript stuff
 
ok

the question i have is....


does anyone know what to use to place values back into a form, from a pop-up type page, to the original page

there is a catch though

i know how to do it with

self.opener

but it doesn't seem to work in all browsers (netscape, and some versions of IE)




do you any of you know another, better, way to do this??? Maybe in php.. without reloading the original page???

taog 04-25-2003 07:06 PM

Re: question about php, or javascript stuff
 
Quote:

Originally posted by delight
ok

the question i have is....


does anyone know what to use to place values back into a form, from a pop-up type page, to the original page

there is a catch though

i know how to do it with

self.opener

but it doesn't seem to work in all browsers (netscape, and some versions of IE)




do you any of you know another, better, way to do this??? Maybe in php.. without reloading the original page???

I posted this under the wrong account. Sorry about that. It was supposed to be me that posted this.












EDIT

I messed something up there. Not all of my message is showing.

sorry guys, and thanks for the help. I think i am just going to keep using the script the way that i have it. It reloads the page, but that's ok. It will work in all browsers, no matter what.

Thanks again for the help.

rekinom 04-25-2003 09:33 PM

Post removed.

ChipX86 04-25-2003 11:29 PM

As not everybody is using a javascript-capable browser, and not everybody with one even has javascript turned on, I'd like to recommend an alternative. Process the page with PHP, and if there's anything missing/incorrect, re-output the page with little red asterisks or whatever, maybe some instructions.

It's pretty easy to do. Setup a function that outputs the page. Now, when the user submits the form, validate all the data. If something is wrong, call the function that outputs the page, and pass an array of fields with errors. The function that outputs it should see if that array is empty, and if not, output a red asterisk or something before every errored field.

I can provide further help if you need it. The advantage is, <b>everybody</b> will be able to use your form.

Cuball 04-26-2003 12:32 AM

I think most browsers are JavaScript capable now ... A simple (fast) javascript check might be better imo, and a lot less serverload.

Dave 04-26-2003 01:07 AM

Quote:

Originally posted by Cuball
I think most browsers are JavaScript capable now ... A simple (fast) javascript check might be better imo, and a lot less serverload.
There's one thing that I feel you should always keep in mind when doing code that accepts data from an untrusted source. Never trust what comes from the client, always verify it. Sure, you can do a client side check, but still never trust it, it's easy to bypass or just to create some false responses. Trusting what has come from the client is a recipe for disaster.

You can never be too secure.

rekinom 04-26-2003 08:51 AM

Post removed.

taog 04-28-2003 01:58 PM

Quote:

Originally posted by rekinom

3.) don't bother.

<i>Is whatever you are doing with client side scripting worth the effort you are going to have to go through? Probably not.</i> [/B]

exactly what i am going to do.


I am going to be selling this, so i will have to make sure it works on every browser. If it doesn't, webmasters won't use it.

thanks a lot for your advice everyone!!!

Are there any freelance php programmers here??

Antagony 04-28-2003 06:02 PM

PHP owns your soul.

gigawatz 04-28-2003 09:34 PM

I don't know if I would call myself freelance, but I feel I'm pretty strong w/ PHP &/or ASP.

check out my site by clicking on the little cute 'www' button below


All times are GMT -8. The time now is 01:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360