pspspsps summoning a nerd who knows javascript!! (or jquery)

213 views
Authorhimbos
Created
Tags codinghelp 

so, basically, i don't SKFKDKIF and idk how to make what i wanna do work. i'm trying to use an if/else statement (possibly in combination with variables) to replace the default "no information" section of a profile field to something else if it's empty yet allow for whatever content people input to show in the field when they input it.

this is a visual of the profile with the section i'm talking about (ignore the info dhfjsjd) so you can see where i'm talking about.

this is the script i'm working with:

...

how do i get this to work? do you understand/see what i'm trying to do with this code?

Comments

You must be logged in to comment.

himbos [A] 20 hours ago
UPDATE!!!! i got it to work with text, but i don't know how to get it working with the html i used. i've tried using "innerHTML" and "html" and i think "textContent" too but none of those worked. will send the code that works in the replies.
himbos [A] 1 day ago
mobile but i'm willing to try jquery style scripts as well but KAKDKSKDKD idk how that works wither. even less so than vanilla javascript. you'd have to write out the script for me if i do it.
comets 1 day ago
so it could have either a default value "no information" or be empty, right? (if the user hasnt written anything)
and you wanna replace that for the text you have there?
himbos [A] 1 day ago
forgot to add that i updated the code as well and tried defaultValue and still no dice.
himbos [A] 1 day ago
just noticed again that rpr mangled my code so i'll add a screenshot of the actual code pls hold.
-lait- 1 day ago
I'm not too familiar with java but I know code in general, is what you're trying to do:
- when the user has written something in the field, show it
- if the user didn't write anything, replace the text 'no information' to something else?
DamnIan 1 day ago
I’m not sure if this is related specifically to RPR but I know on Tumblr a lot of people have stopped using them or containers that have Java scripts because Java script is faulty and does not work anymore on most formats
himbos [A] 1 day ago
rpr keeps deleting it but the else statement contains "< !-- |field_41| -- >"
Log in to view all comments and replies