Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 73992

Trying to create a Pop Up "Modal" window with specific information inside

$
0
0

So I'm new to JavaScript so I'm unsure how to setup my code.

Before explaining its vital to look at my code - https://jsfiddle.net/avaris/bexn436s/

When right clicking inside a container a custom context menu pops up with a button, the button makes div (line 1) visible.

  • I'm trying to make it so if you open the context menu by right clicking inside container4 on line 38 (or any other container) whatever is in ID& NAME class will match infoID, infoName of div (line 1).

  • All I'm looking for is advice or direction on possible solutions.

If opened by right clicking on "NAME4"

<p class="NAME4">Valentine</p> (line 41)

to

<p class="infoName"></p> (line 4)

The context menu script starts on line 61 and you determine in which element the context menu displays at line 144:

var taskItemClassName = "container";

-

I've tested everything but could not figure out a setup due to accessing the "info page" through the custom context menu made it way out of my expertise.

Any direction is all i'm looking for.

Tried to keep it short but if i explained poorly i'd love to give any more information.


Viewing all articles
Browse latest Browse all 73992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>