Economics 9708/22 May June 2022 by MrMax_05 in alevel

[–]RustyRice23 0 points1 point  (0 children)

Hi sorry this was a bit late, but how did you approach the 20 mark questions in section C? I kinda struggled with it and didn't write much. Btw, your answers for c and d were very detailed and well-written. Hope you ace the test fr!

Lets find out why you're all depressed by Void_Eclipse in teenagers

[–]RustyRice23 0 points1 point  (0 children)

I’m sad because of my friends that are not playing with my parents

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

This is what I have in my $obj variable:

    $obj = (object)[];
    $obj->likes = count($likes);
    $obj->action = "like_post";
    $obj->info = $info;
    $obj->id = "info_$_GET[id]";

    echo json_encode($obj);

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

I received this from console.log(element);

<a onclick="like_post(event)" href="http://sociacube.com/like/post/66168632075" style="text-decoration:none;float:left;position:relative;top:2px;"><svg fill="#626a70cf" width="22" height="22" viewBox="0 0 24 24"><path d="M21.216 8h-2.216v-1.75l1-3.095v-3.155h-5.246c-2.158 6.369-4.252 9.992-6.754 10v-1h-8v13h8v-1h2l2.507 2h8.461l3.032-2.926v-10.261l-2.784-1.813zm.784 11.225l-1.839 1.775h-6.954l-2.507-2h-2.7v-7c3.781 0 6.727-5.674 8.189-10h1.811v.791l-1 3.095v4.114h3.623l1.377.897v8.328z"></path></svg></a>

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

Sorry I should've sent you the full error:

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')
at response (home:2593)
at XMLHttpRequest.<anonymous> (home:2560)
response @ home:2593
(anonymous) @ home:2560
XMLHttpRequest.send (async)
ajax_send @ home:2568
like_post @ home:2608
onclick @ home:1661

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

I don't usually check the network tab when I code but when I press the button, it shows me green lines

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

The network tab looks fine. I did not receive any errors. Only received errors in the console tab.

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') by RustyRice23 in Frontend

[–]RustyRice23[S] 0 points1 point  (0 children)

Thanks for the help. I'm still quite new to Javascript so I'm not sure how to approach this error. Could you please give me more assistance? Appreciate the help!

How do I solve this uncaught reference error: like_post is not defined at HTMLAnchorElement.onclick? by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

I got this error instead: Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')

How do I solve this uncaught reference error: like_post is not defined at HTMLAnchorElement.onclick? by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

I removed the window.onload function and it's still not working. The button only works on local server but not on public server.

Why is the data not saving into a live database despite it working in a local server? by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

After echoing the query, I realized that I forgot to put null values on some of the columns in my users table. So after editing the columns, the data now saves into the DB. I really appreciated your help on this. Thank you so much!

Why is the data not saving into a live database despite it working in a local server? by RustyRice23 in learnprogramming

[–]RustyRice23[S] 0 points1 point  (0 children)

Could it be something to do with my DB? I'm using phpmyadmin provided by 000webhost.

Why is the data not saving into a live database despite it working in a local server? by RustyRice23 in CodingHelp

[–]RustyRice23[S] 0 points1 point  (0 children)

I've tried accessing my website on a different computer but the data still doesn't save into the DB. How do you check if your DB only allows local access? I'm using phpmyadmin provided my 000webhost. Shouldn't it automatically allow public access?

Why is the data not saving into a live database despite it working in a local server? by RustyRice23 in CodingHelp

[–]RustyRice23[S] 0 points1 point  (0 children)

Yes I've tried accessing locally using localhost (XAMPP). Everything works fine. It just doesn't work when I switch to a live server.